playMaker

Author Topic: help with combo keys [SOLVED]  (Read 3103 times)

colpolstudios

  • Sr. Member
  • ****
  • Posts: 370
help with combo keys [SOLVED]
« on: December 01, 2013, 07:07:52 PM »
Here is what I need to do.

Has player pressed right arrow key play walking right animation.

Has player pressed up arrow key play walking forward animation.

Has the player pressed both keys play walking diagonal animation (please see link)

All of these need to return to no key was pressed Play stopped animation.

I will need this setup for all of the arrow keys up / down, left / right and the possible diagonals.

My animation character sprite not a 3d model has eight directions of animation.

The character is in 2.5d format with lots of animation and is free for use.

Here is its link : https://app.box.com/s/mppy38c7toe0c1swjncm

Currently I am using a new FSM to control key presses and using bool values.

so on start I set all of the bool values to false.

At present I am only testing forward and right, but trying to include up and right.

get key down up arrow send event moving forward and store the result in bool forward.

get key down right arrow send event moving right and store the result in bool Right.

bool operator using the AND using forward and right store the result in forward right, do this every frame.

So I have three events Forward right, Moving forward and moving right.

Each trans goes to a new state.

Were each bool value is set to true finish and return to start were they will be set back to false.

However I am doing something wrong as only every third attempt to press both keys is detected.

I have the bool values open in the inspector but they do not change.

I need the changes in order to change animation possibly it is happing but to quick for me to see??

What happens when you press key down and you store the result?

I think it stores TRUE you pressed this key.

Ideally I want to learn how to use characters in relation to my post some time ago.

http://hutonggames.com/playmakerforum/index.php?topic=2669.msg12440#msg12440

Just so others can use them

possibly someone with more experience is willing to help me?

I am trying to provide a system of use without the need for paid plugins, but need help.

If playmaker wishes to host these character files within my old post please do so.

The characters are free with the animation with no credit needed for use.














« Last Edit: December 02, 2013, 08:31:39 AM by colpolstudios »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: help with combo keys
« Reply #1 on: December 02, 2013, 04:58:36 AM »
Hi,

 I would suggest you use this action:

http://hutonggames.com/playmakerforum/index.php?topic=4516.0

Bye,

 Jean

colpolstudios

  • Sr. Member
  • ****
  • Posts: 370
Re: help with combo keys
« Reply #2 on: December 02, 2013, 08:30:58 AM »
Perfect many thanks