I don’t see an event where the opacity of the box is brought back to it’s original value. The tween MAY be running again, but as the opacity is already at 0, it will be tweening from 0 to 0
Maybe consider an extra event above the Show & Tween event with a trigger once condition that returns the opacity back to it’s original value
Player is in collision
– trigger once - opacity to 255
– Show & Tween
I thought the trigger once condition had to be inside the same condition box for it to work.
For anyone who may read this in the future, here’s my logic:
Condition:
At beginning of scene: Hide BOX
Condition:
Trigger Once
Condition:
Player is in collsion with Wall
Action:
Show BOX
Change opacity of BOX: set to 255
Tween opacity of BOX
Though my original problem is sovled, do you have any solution to add a cooldown timer?
Like, when the wall is touched, it won’t trigger the box effect again until 5 seconds have passed?
No need for trigger once or show/hide. Opacity already serves for show/hide and your conditions are sufficient to only trigger once already, as they only stay true for one frame.
The use of a timer would be the convenient solution, but it inherits the property of not showing the box, if the player collides with the wall in the first 5 seconds of gameplay. If you want to account for this, you should use a variable timer (best practice). That could go like like this: