[Solved]How to detect a collision once?

1968

  • Posts: 103
In a collision, both actors are alive.
How to get a "hit" once.
Any help would be helpful.

« Last Edit: November 05, 2019, 08:44:11 am by 1968 »

SadiQ

  • Posts: 1795
Just add a boolean inside the collision event. If boolean is false, set it to true and run the code you need.
You can add a timer after that to set your boolean back to false if you need it.
Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.

1968

  • Posts: 103
Thank,
I understand the algorithm 8)