-
-
Notifications
You must be signed in to change notification settings - Fork 177
Map Editor: A feature for simple moving objects #704
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Map Editor: A feature for simple moving objects #704
Conversation
Merge master back
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a solid addition to the map editor, thank you!
I've tested the changes, they're working well. Although I do wonder whether it's worth adding an extra setting for "loop" to decide whether to repeat the movement at all? Currently an object will just keep looping.
Regarding your question on edf.edf, it's not necessary to update it here. The .edf file provided by the "edf" resource determines the default definitions for other resources (a fallback, when they don't provide their own .edf). Since your feature is entirely within the map editor, and bundles functionality into the "mapEditorScriptingExtension_s.lua" script (which is ran by gamemodes/resources such as race on map load), other resources don't need to know about these properties - they aren't "standard" properties.
Essentially, you only need to update the edf.edf for new "standard" entity properties, that all resources should be aware of. No need to update it here!
Same here, although in that case it might need a kind of trigger. Like adding 2 object props with a reference to a start and end marker. <data name="moveBehaviour" type="selection:loop,marker" default="loop" description="Choose 'loop' if you want the object to move between the start and end point indefinitely. Or choose 'marker' and fill in the markerStart and markerEnd elements to make the object move based on marker enter." persistDefault="false" />
<data name="markerStart" type="element:marker" default="" description="When a player enters this marker, move the object to the start position" persistDefault="false" />
<data name="markerEnd" type="element:marker" default="" description="When a player enters this marker, move the object to the end position" persistDefault="false" />But the default behaviour should probably be 'loop' indefinitely. So it could be another feature later down the line without breaking the changes of the current pull request. |
|
Yes! I thought that a trigger system would be awesome too, but didn't want to suggest too much extra work, even though it would be great. I'm happy to defer that to another PR, as the current functionality is already cool. However I do have a suggestion which is probably a quick win. Currently the looping behaviour is wrap-around (once reaches end it resets to the start). Can we add an option for "reciprocal" looping behaviour? So instead of going from A -> B and resetting back to A, it will go A -> B and then update the move target to A (moving smoothly back to the start position, instead of being reset there)? |
Allows you to make some simple object movements in your map editor.
Changes:
Unknowns: