playMaker

Author Topic: Get Button for sprint on Controller?  (Read 2387 times)

crush

  • Playmaker Newbie
  • *
  • Posts: 24
Get Button for sprint on Controller?
« on: August 07, 2015, 07:16:25 PM »
Hey I searched around for info on this but can't find anything yet.

I have a mouse and controller setup for everything I want working (Joystick button 0 etc etc) however I can't seem to figure out how to use playmaker actions to make a character sprint using the Standard Unity FPS controller.

It works by default with mouse and keyboard with "Shift"  but on the controller I am not sure what to enter into the input manager. I tried making a new input called sprint and using a joystick button number but no luck with that. It's probably really easy, thanks for any help on this.

mdotstrange

  • Hero Member
  • *****
  • Posts: 555
    • Can't code? Who cares! Make games anyway!
Re: Get Button for sprint on Controller?
« Reply #1 on: August 07, 2015, 07:46:32 PM »
You can probably use the "set property"  action to access the sprint variable in the FPS script- its probably a bool-

Then just use a get button down action to fire the set property to turn sprinting on- flip the variable back to stop sprinting
Indie game dev and instructor at the Strange School. Learn Playmaker at the Strange School!

crush

  • Playmaker Newbie
  • *
  • Posts: 24
Re: Get Button for sprint on Controller?
« Reply #2 on: August 07, 2015, 09:21:36 PM »
ahh interesting, thanks mdotstrange, good idea ok will try that and let you know how it go's.