playMaker

Author Topic: [SOLVED] Conditions  (Read 2872 times)

leo_silvas

  • Playmaker Newbie
  • *
  • Posts: 5
[SOLVED] Conditions
« on: August 02, 2012, 09:48:28 PM »
Hello, I'm now starting to use the Playmaker and I'm trying to understand how the system works for conditions.

An example:

My character is with idle animation.

IF I hold the right arrow key, changes the character animation for walking, but I wish the animation was walking only if its speed on the X axis is greater than 0 (I'm testing events for a platform game).

BUT NOT if I is the character on the ground (during a jump or fall), I do not want the animation if I switch to walking IF I hold the right arrow key.

As I do so that the character change to walking animation only IF it is on the ground??

__________

Another example:

My character is walking when I hold the right arrow key, but IF I press and hold Left Ctrl + right arrow key, I want to change your character animation to run.

I'm not able to make the event occurs only under conditions combined.

Please, could someone explain in detail or even post an example of how to combine conditions for the occurrence of the event?

Two days ago I'm trying and I can not already... watched all tutorials videos and have searched the whole forum.

Thanks in advance!
« Last Edit: August 04, 2012, 01:50:18 PM by leo_silvas »

shinodan

  • Full Member
  • ***
  • Posts: 180
    • Shinozone
Re: Conditions
« Reply #1 on: August 03, 2012, 04:19:34 AM »
Your explanation confused me a little but your gonna need to make a global variable "speedx" that keeps track of the movement speed of your chars x axis i dont know if there is an action but you can get speed and store it in the globalvariables. state 1 i guess would start with get key - right. State 2 asking the question maybe float compare asking if your global variable speed is greater than 0. if its not return to state 1 if yes goto state 3 and add more questions?

is that what u mean? :/

leo_silvas

  • Playmaker Newbie
  • *
  • Posts: 5
Re: Conditions
« Reply #2 on: August 03, 2012, 01:37:30 PM »
Hi shinodan, thanks for reply!

Okay, I will summarize the doubt to facilitate.

I want an event to occur only in the following condition:
Two keys are pressed down (right Ctrl + left arrow key, for example).

This event can not occur if I press down only "right Ctrl" or  "left arrow key", but only if both keys were pressed down.

Say the trigger event for this condition have pressed these two buttons is that a cube was destroyed by example.

How should I do to make the event this condition occurs only have the two keys down??

I know this is basic, but I can not create this condition in any way  :(

leo_silvas

  • Playmaker Newbie
  • *
  • Posts: 5
Re: Conditions
« Reply #3 on: August 03, 2012, 02:00:46 PM »
Ok, this image will clarify my doubt:



I want to create this condition, the event occurs only if it complies with this condition: if these two keys pressed down.
« Last Edit: August 03, 2012, 02:07:44 PM by leo_silvas »

leo_silvas

  • Playmaker Newbie
  • *
  • Posts: 5
Re: Conditions
« Reply #4 on: August 04, 2012, 01:49:56 PM »
Solved! Simply created intermediate states for each key. Basic playmaker that I did not understand  :D