playMaker

Author Topic: Explosion Force  (Read 2076 times)

Rabagast

  • Hero Member
  • *****
  • Posts: 683
    • View Profile
    • Homepage
Explosion Force
« on: June 03, 2015, 01: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?
Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14483
  • Official Playmaker Support
    • View Profile
Re: Explosion Force
« Reply #1 on: June 03, 2015, 11:50:59 PM »
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

Rabagast

  • Hero Member
  • *****
  • Posts: 683
    • View Profile
    • Homepage
Re: Explosion Force
« Reply #2 on: June 04, 2015, 12: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. :)

Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no

dudebxl

  • Hero Member
  • *****
  • Posts: 602
    • View Profile
Re: Explosion Force
« Reply #3 on: June 04, 2015, 01:46:36 PM »
Have you tried this action: SendEventToGameObjectsWithinRadius ??

check the Ecosytem

Rabagast

  • Hero Member
  • *****
  • Posts: 683
    • View Profile
    • Homepage
Re: Explosion Force
« Reply #4 on: June 04, 2015, 10:41:23 PM »
Hi!

I don't find this Action on Ecosystem.
Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no

dudebxl

  • Hero Member
  • *****
  • Posts: 602
    • View Profile
Re: Explosion Force
« Reply #5 on: June 05, 2015, 06: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..
« Last Edit: June 05, 2015, 06:48:36 AM by dudebxl »

Rabagast

  • Hero Member
  • *****
  • Posts: 683
    • View Profile
    • Homepage
Re: Explosion Force
« Reply #6 on: June 05, 2015, 06: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! :)
Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no