After using forge scripting over the past week, I and many others are starting to see some holes.
I have a simple scenario I want to build with two elevators on a cliff. One platform is at the top, the other the bottom, and there are switches at the top and bottom. I want to make it so that if either of the switches is toggled, the platform at the top goes down, and the one at the bottom goes up simultaneously. This of course will be repeatable.
This should be very easy to do, but because of the way custom events are executed, nothing with any sort of duration (think translate object to point) happens simultaneously. When a “trigger custom event” is executed, the custom events with that identifier are executed in sequence. What this means is that when I push any button to call the elevator, only one platform moves at a time. Is it still an elevator? Yes. Is it a GOOD elevator? No.
Now, some savvy scripters might be saying I can make this work if I don’t use custom events, which is true. I can make 2 calls of “on object interacted” at each switch and call “translate object to point” on each. Yes, this is a way to move the platform simultaneously.
But now imagine I have 10 switches and 20 platforms and I want the same logic - if any switch is hit, move all platforms. This is exactly the situation custom events are for, but they do not work for simultaneous movement. And it’s crazy to suggest putting together 200 streams of nodes using “on object interacted” to get the simultaneous movement. And you would need to add even more node logic if your platforms have any objects acting as cover/obstacles associated with them (something that could easily be resolved if prefabs could be treated as singular objects, at least for movement purposes.)
My requests for improvements are:
Include an option for custom events for simultaneous execution
If that can’t be done, at least let multiple actions branch off of nodes so “on custom event” doesn’t need to be called more than once.
Allow prefabs to be treated as an object so whole structures can be moved at once, instead of their individual pieces.
This is a long winded post but I hope it gets the point across.
Also, are your elavators going up and down smoothly? For some reason I just can’t get mine to go up or down without jittering or making them unreasonably slow
Also, while this isn’t as relevant to elevators, moving platforms in general do not transfer velocity to players directly. They can if you make them have normal physics, but this can break the transitions, because you’ll need the platform to rest on something to move. Also, they can be blown across the map by explosives when they have normal physics. I’m for the most part happy with forge, very impressed with what it can do, but moving platforms and elevators are subpar, which is a shame, because elevators have been a core part of multiplayer since Halo 2.
i know what you mean by making prefabs treated as an object. i noticed that problem too last week. what he’s saying is if you add objects to a group, there are issues applying scripts to the new group.
i sort of got around this problem by making sure each and every item in my group were set to dynamic objects because only dynamic objects can have scripts applied to them.
motion in general is really frustrating to script with in forge,. even in halo 5 forge i had trouble getting smooth scripted motion. there are some tutorials on youtube about how to improve smooth motion in halo 5 forge by doing redundant set velocity AND move to position actions at almost the same time to force server-client refresh ratre updates as frequently as the game engine will allow. in halo 5 forge i think it was refresh every 0.5 seconds was the minimum value. in halo infinite it seems like this value is an improvement at refresh every 0.1 seconds.
but scripting moving objects shouldn’t require to set velocity AND call change object position, and all of this extra server refresh rate nonsense to get smooth visuals in game.
like there should just be a universal Event node for all sorts of motion of object situations.
you need to make an elevator? the Move node should have you covered with place start and end point invisible mesh icons for start and finish in your map. and a wait point too. and like, if you want your elevator to spin like a corkscrew spiral and the platform has angular velocity, well the Move node should just handle all of that. Furthermore, it should be smooth motion, it should automatically know to refresh client server refresh rate so that the velocity, position change, rotation change, and angular velocity are automatically set up properly in the Move Action Node
Have your custom event set a boolean variable to true, while an every n seconds script checks for the boolean to be true.
When one elevator is scripted to start, the other is scripted to start .10 seconds later. After the first custom event is done, set boolean value to false.