I have a sprite that when the player collides with it, it triggers a tween to move a nearby horizontal door to the left. I want it to tween back more slowly if the sprite is collided with again as long as the first tween has finished. Below is what I have. It works to start the tween, and to do the tween to make it go back. But, after that, collisions with the “switch” sprite no longer trigger the process again.
The problem is that last event (labelled 3 in the image below) only gets checked once, when the tween doorMoveRight is created. and the conditions in the parent (labelled 2 in the image below) are met (i.e. once). So the tweens will never be removed
Add a condition to the first event (labelled 1) to also check that doorMoveRight doesn’t exist.
Change the event labelled 2 ;
-change the condition to check that doorMoveLeftt doesn’t exist
-add a condition to check that doorMoveRight doesn’t exist, and
Remove the set boolean object variabel SwitchLever.on from both the exising subevents (the subevents of the events labelled 1 & 2)
Outdent/ move the last event (labelled 3) to be in line with the 2 parent events (labelled 1 & 2)
Then split that last event into two event
-one to check that doorMoveRight has finished playing, removing the tween and setting the boolean object variable SwitchLever.on to false
-the other to check that doorMoveLeft has finished playing, removing the tween, and setting the boolean object variable SwitchLever.on to true
That is blindingly obvious, and the comment is of no help.
uh yah a little cuz i just looked at the picture of like 5 seconds and then assumed the conditions were not met(thought idk which ones were not cuz I only looked at it for 5 seconds, sorry)