playMaker

Author Topic: [SOLVED] Henk Dawson's grenade variation  (Read 2497 times)

terrymorgan

  • Junior Playmaker
  • **
  • Posts: 65
[SOLVED] Henk Dawson's grenade variation
« on: April 14, 2012, 07:27:41 PM »
I tried to duplicate this video, a variation of the grenade prefab-

http://web.me.com/henkdawson/Unity/Tutorials/Entries/2011/7/22_Playmaker__Cannon_Ball_Explode.html

Except he uses a 'cannon' and 'input manager' where I was trying to use the 1st person controller and
scene from samples/testlab/physics/throw grenade. I make grenades but they just hang in the air, I think
there's a problem with the 'lastgrenade' which refers to the grenadeprefab. I can't select
'none' for the /wait-finish event action of shootcannonball.

 I'm basically looking for a
grenade that explodes instantly on collision with an object, a.k.a 'bullet'
« Last Edit: April 15, 2012, 10:48:16 AM by Alex Chouls »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: Henk Dawson's grenade variation
« Reply #1 on: April 15, 2012, 12:02:34 AM »
Did you start wih the ThrowGrenade scene? Select the grenade prefab, and edit its FSM to go to the explode state with the COLLISION ENTER event. I'm not at my computer right now, but if memory serves, this should be a fairly straight forward modification to the grenade prefab's FSM.

Did you start with the grenade prefab? If you made a new prefab, double check the rigid body setup...

terrymorgan

  • Junior Playmaker
  • **
  • Posts: 65
Re: Henk Dawson's grenade variation
« Reply #2 on: April 15, 2012, 10:30:08 AM »
I made a copy of the grenade prefab- FSM goes -countdown(finished)->blink(finished)->explode, not sure where to stick the
collision enter bit, do I edit 'countdown' to transition to collision enter and 'delete blink?' Rigid body hasn't
changed to my knowledge.

terrymorgan

  • Junior Playmaker
  • **
  • Posts: 65
Re: Henk Dawson's grenade variation
« Reply #3 on: April 15, 2012, 10:42:58 AM »
I made a ctrl_d copy of grenadeprefab, on its FSM I deleted blink, and changed 'finished' on countdown to collision enter, connected to explode, voila, weapon. I guess I need a baddie next, and a way to make the
grenade subtract hit points, etc.