RigsOfRods / rigs-of-rods

Main development repository for Rigs of Rods soft-body physics simulator
https://www.rigsofrods.org
GNU General Public License v3.0
1.01k stars 178 forks source link

Add `add_animation` input sources to use instead `event ***` #3023

Open ohlidalp opened 1 year ago

ohlidalp commented 1 year ago

Animation source ignition is needed to replace event TRUCK_TOGGLE_CONTACT - From Discord https://discord.com/channels/136544456244461568/189904947649708032/1081269810769440888

I have animations that trigger when X is pressed. The animations I have set are in their “disabled” state when spawned. The animations work fine for anybody who has spawn engine running turned off, because you spawn and start the actor therefor triggering the animation. But if somebody were to have engines spawn running turned on, then the actor would spawn already started but the animations are still in their disabled state, therefor reversing the function of the animation.

Update: the same problem, but with blinkers. Animation sources blink_left/right are needed to replace event TRUCK_BLINK_LEFT/RIGHT - from Discord https://discord.com/channels/136544456244461568/409871728597139457/1228636932213575731

I'm trying to add animation to a turn signal stalk prop. I'm using event as source and TRUCK_BLINK_LEFT keypress event. It works, it moves the stalk down when I activate the left turn signal. I want it to stay down, so I use eventlock (stays down until it receives another TRUCK_BLINK_LEFT keypress event). But if the turn signal gets cancelled automatically, the stalk stays down because it doesn't receive its keypress event again. Next time I activate it, it goes up instead of down. I understand it works that way by design, but is there a way around that? or should I just give up on using eventlock and be happy that the stalk moves at all?