playMaker

Author Topic: trigger enter and keydown  (Read 2642 times)

2dgamemania

  • Playmaker Newbie
  • *
  • Posts: 2
trigger enter and keydown
« on: February 12, 2015, 04:58:59 AM »
Hi,  I'm new to playmaker.  I have a human character in unity running into a teleporter which works fine.  I've setup a fsm and it uses trigger enter but what I wanted to do was only use the teleporter if i press a certain key, so i need to use keydown with trigger enter somehow but can't seem to get it working, any ideas ?

Thanks

Dave

richardh

  • Junior Playmaker
  • **
  • Posts: 97
Re: trigger enter and keydown
« Reply #1 on: February 12, 2015, 05:43:02 AM »
EDIT:
see my post below.
« Last Edit: February 12, 2015, 06:55:00 AM by richardh »

richardh

  • Junior Playmaker
  • **
  • Posts: 97
Re: trigger enter and keydown
« Reply #2 on: February 12, 2015, 06:50:15 AM »
Okay, had a play now. There is probably an easier way but this is how I got your scenario to work...


First FSM =
Trigger 'player' tag on enter FINISHED >

2nd FSM =
Trigger 'Player tag on exit FINISHED (returns to 1st FSM)
Get Key Down 'T' TELEPORT > (hops to 3rd FSM)

3th FSM =
Teleport Player (to where ever!)
Wait 1 sec FINISHED > (loop to FSM 1) (this bit not necessary but I put it in to test as I had nowhere to teleport to!)




« Last Edit: February 12, 2015, 07:40:24 AM by richardh »

2dgamemania

  • Playmaker Newbie
  • *
  • Posts: 2
Re: trigger enter and keydown
« Reply #3 on: February 19, 2015, 05:35:54 AM »
Thanks for helping and i've got it to work, appreciate you doing the youtube video also:)

richardh

  • Junior Playmaker
  • **
  • Posts: 97
Re: trigger enter and keydown
« Reply #4 on: February 19, 2015, 06:53:58 AM »
No Probs. Hope it helped.