playMaker

Author Topic: Get Axis simple question  (Read 1769 times)

wheretheidivides

  • Sr. Member
  • ****
  • Posts: 496
Get Axis simple question
« on: May 26, 2014, 07:25:27 PM »
So using playmaker's 'get axis', I want the player to choose 1 of 4 menu settings.  So left, right, up and down on the joystick will select different buttons.

I added 'get axis'.
axis name 'vertical'
multiplyer 1 (have no idea what this does)
store (I guess store this in a variable)
every frame 'true'

So I want to go up to select a button and go down to select a button.  How to do this?  What does this multiplyer do?  Store it where (I guess a global variable).  and how to make the change (I guess use a bool check).

So what's the deal with this multiplyer.

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4002
  • Official Playmaker Support
    • LinkedIn
Re: Get Axis simple question
« Reply #1 on: May 26, 2014, 08:31:52 PM »
The output of Get Axis is a float from -1 to 1. The multiplier lets you multiply the output so the range is bigger (multiplier of 40 results in a range from -40 to 40). For example, if you're using the output to move a character, the multiplier might be the maximum speed the character can move.

To interpret axis movements as buttons use the Axis Event action. It sends events based on the horizontal and vertical axis. You could use this to send Up, Down, Left, Right events.
« Last Edit: May 26, 2014, 08:33:29 PM by Alex Chouls »

wheretheidivides

  • Sr. Member
  • ****
  • Posts: 496
Re: Get Axis simple question
« Reply #2 on: May 26, 2014, 09:17:20 PM »
Really cool.  I did get it work with the axis by multiplying it to a big number, but axis event is exactly what doctor who ordered.  I have to say, playmaker and unity is so unbelievable cool.  It took me a long time to design a game with javascript, but with playmaker:  wow!