playMaker

Author Topic: Playmaker and Exploder - how to trigger an explosion?  (Read 4621 times)

karmacomposer

  • Playmaker Newbie
  • *
  • Posts: 6
Playmaker and Exploder - how to trigger an explosion?
« on: May 02, 2014, 08:09:03 PM »
If anyone has experience with the exploder playmaker scripts, I am trying to get my character to destroy an item when kicking it, punching it, etc.  I am using on trigger enter on both the character and a barrel.  Both are rigid bodies (no gravity since then they fall through the terrain).

How do I make this work?

Thanks for your help.

Mike

Martin-Vaupell

  • Junior Playmaker
  • **
  • Posts: 70
  • Creating CarbonDiOxide
    • Evisystems
Re: Playmaker and Exploder - how to trigger an explosion?
« Reply #1 on: May 03, 2014, 02:57:09 AM »
exploder comes with playMaker actions it's very fun!

Made a prototype game here where i used exploder.
https://dl.dropboxusercontent.com/u/19761809/unity/projects/Machinery/web.html

The way I am using it,
All gameObjects that are going to explode must have the "exploder Script" attached to the top parent (if any)

Then In playmaker you can trigger that script via the exploder action the asset
adds to the action browser, just type in explo  and it should show the availible actions.

Check this image..

http://i.imgur.com/R3RNewD.png

It's from that prototype game..
« Last Edit: May 03, 2014, 03:22:35 AM by Martin-Vaupell »

karmacomposer

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Playmaker and Exploder - how to trigger an explosion?
« Reply #2 on: May 03, 2014, 09:57:12 AM »
Thank you for your help.  However, I am trying to explode objects as they are either hit, punched, kicked, or shot at by a device.  How do I trigger the explosion?  What do I use?  Right now, I am using collision event on enter with no luck.

Thanks again.

Mike

Martin-Vaupell

  • Junior Playmaker
  • **
  • Posts: 70
  • Creating CarbonDiOxide
    • Evisystems
Re: Playmaker and Exploder - how to trigger an explosion?
« Reply #3 on: May 03, 2014, 02:18:20 PM »
Thank you for your help.  However, I am trying to explode objects as they are either hit, punched, kicked, or shot at by a device.  How do I trigger the explosion?  What do I use?  Right now, I am using collision event on enter with no luck.

Thanks again.

Mike

that is what you are seeing on that screenshot!
You can see the die state triggers the explode action wich then triggers the script.


So in your case it's extremely similar.
Have a wait state, then on a collide or trigger move to the next state which has
the explode action in it.
Only reason the screenshot is different is because the units have health.


If i where you i would setup a FSM on the object that will explode

Start ->  (wait state) [onTrigger by player - goto event] -> [Explode action]

karmacomposer

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Playmaker and Exploder - how to trigger an explosion?
« Reply #4 on: May 04, 2014, 11:58:56 PM »
Start ->  (wait state) [onTrigger by player - goto event] -> [Explode action]

What do you mean by 'wait state'?  There is a wait action, but I can't see why that would be helpful.

I cannot find a onTrigger by Player nor a goto event.  I apologize for being such a noob.  If you could please clarify this advice.

Also, I am having a hell of a time with the other aspect - the player colliding with or hitting the object to explode.  I don't want it to simply explode when the player rubs against it - the player needs to kick, punch, hit, etc. for it to explode.

How do I do this?  Anything I have tried simply does not work.  Both the Player object (this is 3rd person so there IS a actual player character) and explode objects are rigid bodies.

Thanks.

Mike

Martin-Vaupell

  • Junior Playmaker
  • **
  • Posts: 70
  • Creating CarbonDiOxide
    • Evisystems
Re: Playmaker and Exploder - how to trigger an explosion?
« Reply #5 on: May 05, 2014, 03:36:29 PM »

Ok, then i HIGHLY recommend that you before continuing with your development.
Go through the basic tutorials right here on the website..

http://www.hutonggames.com/tutorials_getting_started.php

Those will help you familiarize yourself with how events and states work.