Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Rabagast on June 03, 2015, 04:35:49 PM

Title: Explosion Force
Post by: Rabagast on June 03, 2015, 04:35:49 PM
How can I make the Explosion Force affect other objects?

Now I have a Game Object with the "Add Explosion Force". And when other objects or the player are to close to the explosion object, then these objects will blow up in the air. How can I do that?
Title: Re: Explosion Force
Post by: jeanfabre on June 04, 2015, 02:50:59 AM
Hi,

 you'll need a third party asset, or have a fsm that either gets a list of close RB and apply force to them, or fire a global event  sending data like the epicenter and magnitude of the explosions and other gameobject can then detect if they need to be part of the explosion.

bye,

 Jean
Title: Re: Explosion Force
Post by: Rabagast on June 04, 2015, 03:35:58 AM
I tried to use a Sphere trigger and add a Trigger Enter with tag. And then store this to a variable and add force to the variable. It worked with only one of the objects.

I found another topic on this forum about the same. You gave him the same answer. And Lane recommend this asset: "
Circular Gravity Force." Is a little bit expensive, but it has good reviews. :)

Title: Re: Explosion Force
Post by: dudebxl on June 04, 2015, 04:46:36 PM
Have you tried this action: SendEventToGameObjectsWithinRadius ??

check the Ecosytem
Title: Re: Explosion Force
Post by: Rabagast on June 05, 2015, 01:41:23 AM
Hi!

I don't find this Action on Ecosystem.
Title: Re: Explosion Force
Post by: dudebxl on June 05, 2015, 09:40:19 AM
Oh sorry, did not know.. this where i got the info while searching for something else:

http://hutonggames.com/playmakerforum/index.php?topic=2946.0

and should you read this: http://docs.unity3d.com/ScriptReference/Physics.OverlapSphere.html

'I tried to use a Sphere trigger and add a Trigger Enter with tag. And then store this to a variable and add force to the variable. It worked with only one of the objects.' -- did you try  'Trigger Enter with tag' from the gameobject that impact with explosion (each gameobject and not explosion gameobject) and then add itself to a global array list which you can use for further use (send event, etc)?

hope it helps..
Title: Re: Explosion Force
Post by: Rabagast on June 05, 2015, 09:56:50 AM
Hi!

I Haven't tried that. I was thinking I could use Array. To add everything in the trigger in an Arraylist. I think I will experiment a bit. See what I come up with. :)

Thanks for the help and suggestions! :)