I work on a mod recently. I need to make a new kind of controller. When player press wasd, the character should move around in the scene, but I want the viewport to stay. When player presses some key, say spacebar, the viewport aligns with the character. With the api available now, I have to combine a character entity with a god mod controller in code.
This kind of controller benefits some specific mode. It works way better when player needs to dodge any moving object.
New controller
-
- Fast Inserter
- Posts: 152
- Joined: Sun Jun 16, 2019 4:04 pm
- Contact:
Re: New controller
moved from suggestions to modding requests— ssilk
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
-
- Fast Inserter
- Posts: 152
- Joined: Sun Jun 16, 2019 4:04 pm
- Contact:
- eradicator
- Smart Inserter
- Posts: 5211
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: New controller
In the mean time you could also try using a full-screen camera gui element with the default controller.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
-
- Fast Inserter
- Posts: 152
- Joined: Sun Jun 16, 2019 4:04 pm
- Contact:
Re: New controller
But, in this way, it is possible to keep more ui as what we see in general cases?eradicator wrote: ↑Tue Dec 01, 2020 12:52 am In the mean time you could also try using a full-screen camera gui element with the default controller.
My plan is that a god mod controller, a separated character entity, and they work together via lua. But I need one more short cut to move the view port. Which might occupy one short cut for items, and I have to code for it.
- eradicator
- Smart Inserter
- Posts: 5211
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: New controller
Overlapping guis are always difficult. Making the cam not full-screen but a bit smaller might work.yagaodirac wrote: ↑Tue Dec 01, 2020 2:15 am But, in this way, it is possible to keep more ui as what we see in general cases?
It's just that from my experience using LuaEntity.walking_state doesn't really work in multiplayer due to lag hiding mechanisms - if you are indeed using walking_state.yagaodirac wrote: ↑Sun Nov 29, 2020 7:02 am I have to combine a character entity with a god mod controller in code.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
-
- Fast Inserter
- Posts: 152
- Joined: Sun Jun 16, 2019 4:04 pm
- Contact:
Re: New controller
Thanks. I didn't start with this part yet. I'm gonna try it out. Actually I don't mean to make something look like factorio, maybe I would do entity.teleport or something without animation in order to make multiple looks for players to choose from. Don't know if that works well.eradicator wrote: ↑Tue Dec 01, 2020 1:30 pmOverlapping guis are always difficult. Making the cam not full-screen but a bit smaller might work.yagaodirac wrote: ↑Tue Dec 01, 2020 2:15 am But, in this way, it is possible to keep more ui as what we see in general cases?
It's just that from my experience using LuaEntity.walking_state doesn't really work in multiplayer due to lag hiding mechanisms - if you are indeed using walking_state.yagaodirac wrote: ↑Sun Nov 29, 2020 7:02 am I have to combine a character entity with a god mod controller in code.