Joystick Mapping Demo

You must understand the Game Editor concepts, before post here.

Joystick Mapping Demo

Postby DST » Wed Jul 07, 2010 1:47 am

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
It's easier to be clever than it is to be kind.
http://www.lostsynapse.com
http://www.dstgames.com
User avatar
DST
 
Posts: 1117
Joined: Sun Apr 15, 2007 5:36 pm
Location: 20 minutes into the future
Score: 151 Give a positive score

Re: Joystick Mapping Demo

Postby jimmynewguy » Wed Jul 07, 2010 2:49 pm

Awesome Demo. I still hate you for your drawing skills. :)

PS: This needs to be a full game. NOW. :mrgreen:
Working on a probably too ambitious project! Wild-west-adventure-RPG-shooter-thing.
User avatar
jimmynewguy
 
Posts: 1137
Joined: Sat Mar 31, 2007 6:27 pm
Score: 89 Give a positive score


Return to Advanced Topics

Who is online

Users browsing this forum: No registered users and 1 guest

cron