Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: blake3d on May 31, 2015, 12:05:35 PM
-
Hello, I am relatively new to this and am struggling with something that I feel is probably simple. I have a game object that falls into a scene and causes an explosion after a set time. I would like it to destroy other objects close to it by its force, what should I be setting up on the other game objects to detect the explosion and destroy itself?
-
I do this by having the bomb object tagged "explosion"- when it explodes it uses a send event "Broadcast all" of "explosion"- then the objects that can be damaged by it have a global transition/event called "explosion"
So when the object explodes it sends that event- then when the objects receive it they measure their distance between themselves and the object that sent the event- I use the distance with a float compare to decide if they should be damaged or not- works really well
-
I do this by having the bomb object tagged "explosion"- when it explodes it uses a send event "Broadcast all" of "explosion"- then the objects that can be damaged by it have a global transition/event called "explosion"
So when the object explodes it sends that event- then when the objects receive it they measure their distance between themselves and the object that sent the event- I use the distance with a float compare to decide if they should be damaged or not- works really well
Could you post your example here, so I could play around with it? It's exactly what I'm looking for :)
-
That worked like a charm, thank you!
-
That worked like a charm, thank you!
I'm glad it helped :)
-
Would it be possible to see the example of this implementation? Sounds like it might be more efficient than the way I'm doing it now.
Thanks