playMaker

Author Topic: Gate  (Read 3282 times)

Lobohotpants

  • Playmaker Newbie
  • *
  • Posts: 38
Gate
« on: June 19, 2012, 03:27:48 PM »
I'm in need of an action that works similar to a kismet action in UDK.    Here's the reference.

Gate

This action allows you to pass through a signal to the Out link depending on the state of the gate. To change the state of the gate, send a signal to the Toggle input. To open or close the gate, send a signal to the Open or Close input, respectively. The Out tab will be active when there is an 'In' signal AND the gate is opened. This is useful to combine inputs, e.g.: If two conditions must occur for an action to be triggered. This can be achieved by opening the gate when Condition 1 is met and firing 'In' signal when Condition 2 is met.



Properties
Auto Close Count - Sets the amount of times the gate can be activated before it closes automatically. A value of 0 disables this functionality.
Open - If checked, the gate will initially be open.
Input Links
In - Passes signal through to the Out output link if the gate is currently in the open state.
Open - Sets the gate to the open state.
Close - Sets the gate to the closed state.
Toggle - Toggles the state of the gate.

Any help is appreciated!  Thanks!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Gate
« Reply #1 on: June 20, 2012, 01:23:12 AM »
Hi,

 Ok, just a word on vocabulary, that I am sure will help you progress in your understanding of PlayMaker:
 
For your "gate", you will need at a lest a whole Fsm, with several states, global transitions and variables to achieve what you want to do.

1: Properties: they are the variables you define in a Fsm

2: Input Links: They are the global transitions. They allow you to control the Fsm to tell it to do something special

So the OPEN CLOSE TOGGLE are Events you define in that Fsm. They will likely be set to "global" so that other fsm can trigger them

3: Output Links: They are global events fired using "send event" action for example

4: Output links within Fsm, are the transition between states, so they are ultimatly events as well, but they only have a local effect of moving from one state to another.

 What can be difficult to grasp here is that there is no visual editing of these "output links" amongst fsm, you can transit visually from a state to another, but you can visually link two fsm together, It's totally possible tho. For example Send event allow you to fire a global event to a specific Fsm in your scene, so this would be the implementation of an output links in playmaker.

Now:

I have done a while ago a "elevator" that is very similar to what you are describing, it's not a gate, it's a lift, but the only difference is that a lift is going up and down, while a gate is pivoting. Apart from that, you will find all these concepts applied in a working scene.

http://hutonggames.com/playmakerforum/index.php?topic=1552.msg6745#msg6745

Have a good look at this, and study how fsm are communicating to each other and the various implementation of the toggle and control of the elevator. If you don't find what you want, let me know, and I'll do a gate just like the one you describe.

bye,

 Jean
now, the IN