Page 1 of 1

Joystick Mapping Demo

PostPosted: Wed Jul 07, 2010 1:47 am
by DST
Here's a basic demo i whipped up explaining how to make custom controller mapping.

It's sloppy but gets the point across: You create 2 arrays, one for presses, and one for the map. Then when you change your button options in the menu, the button you press is fed into the map slot for the selected action.

Then in the draw actor, each button press stores GetJoystick1Button(mapslot); Meaning, the action slot is looking only at the button that it was mapped to.

The demo is sloppy but shows a couple of other things as well, with a screen shake and a giant robot.

INSTRUCTIONS: Press spacebar to make menu appear/disappear. Click on one of the numbers next to an action to highlight it, then press a joystick key to assign that action. (note: There is no start or bomb yet. It still maps any button, i just didn't add any events for them yet).

The main joystick script is inside Menu>Draw Actor and Player>Draw Actor.

aces.jpg

JoystickDemo.zip
(930.25 KiB) Downloaded 233 times

Re: Joystick Mapping Demo

PostPosted: Wed Jul 07, 2010 2:49 pm
by jimmynewguy
Awesome Demo. I still hate you for your drawing skills. :)

PS: This needs to be a full game. NOW. :mrgreen: