Is it possible to change what b1-b4 correspond to?
Displaying 1-11 of 11 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
rpgking

I know that b1-b4 correspond to both keyboard keys and joystick buttons. Is there any way at all that I can remap the keyboard keys and joystick buttons that these go to?

Posted on 2004-04-26 01:41:05

resident

Not that I know of. I've got some controller related questions as well (http://www.verge-rpg.com/boards/display_thread.php?id=12163), but to summarise... are there aliases like B1-B4 for directions as well?

Posted on 2004-04-26 18:45:30

rpgking

Yes, there are. It's up, down, left, right.

I'm pretty sure that's what you're looking for.

Posted on 2004-04-26 19:50:00

mcgrue

I have already requested a setKey() function to remap these during runtime. Yes, it's very very useful. No, it's not in yet.

For the moment I'm wrapping my control mechanisms. However, this still makes it impossible to move the player during runtime with anything but the predefined arrows and your joystick's predefined U/D/L/R, and no way to activate Adj. Act. ents and zones but the predef b1's.

Posted on 2004-04-26 20:08:44

Kildorf

That's not entirely true, McGrue. You can use other keys to move the player; I've done so! It's the dumbest workaround ever, and I'm sure there's a better way involving HookKey, but here it is (in this case, remapped to the W/S/A/D keys). This needs to be put in a function that's either HookRender()ed or HookTimer()ed... I use HookRender():


// HAHA BEST WAY TO REMAP KEYS EVAR
if(key[SCAN_W]) key[SCAN_UP] = 1;
else key[SCAN_UP] = 0;
if(key[SCAN_S]) key[SCAN_DOWN] = 1;
else key[SCAN_DOWN] = 0;
if(key[SCAN_A]) key[SCAN_LEFT] = 1;
else key[SCAN_LEFT] = 0;
if(key[SCAN_D]) key[SCAN_RIGHT] = 1;
else key[SCAN_RIGHT] = 0;


If you hit the arrow keys, your player moves a few pixels but stops. I suppose that could be used for edging around so you don't fall off things or what have you. Anyway, I imagine that the b1 etc. keys could be remapped similarly.

Also, you should put "whitespace: normal;" in the style for <pre> tags; it should alleviate the double-spacing issue in code listings.

Posted on 2004-04-26 22:08:09

mcgrue

Ahaha! That's an awesome hack and I should've thought of it.

I shall use that in my temporary wrappers for Sully. However, since Sully's the tech demo, it'd be nice to not need a hack at some point ;)

Also, I shall take your css-loving advice to heart and insert it with great vengeance when I get home. My ladymate tricked me into going with her to her college for an inane reason and now I'm trapped her on neutered campus machines.

Posted on 2004-04-26 22:12:57

Kildorf

...now I'm trapped on her neutered campus machines.

Neutered? o_O What, were they getting frisky with each other in the labs or something?

Posted on 2004-04-26 22:16:56

mcgrue

Let's try and summon a rant from Zeromus about locked down lab machines! ;D

Lab machines suck because they're made to be idiot-proof and 1337 d00d proof. It's too bad people don't give free reign over the machines and then force reghosting after reboot, and force reboot after 15 minutes of inactivity as the only point of lockdown.

Posted on 2004-04-26 22:23:58

vecna

It will be possible to remap b1-b4 in the next build, but NOT up/down/left/right, unfortunately. In the case of joysticks, the directional pad is a totally different interface than the button interfaces, and in the case of the keyboard, I do special processing on the arrow keys anyway to allow both pads to be used (because I find programs that only allow input from the small pad extremely distasteful - like ika ^_^). Your hacked WSAD code is probably the best solution.

Posted on 2004-04-26 23:40:40

Kildorf

Your hacked WSAD code is probably the best solution.

I'm not sure if I should be honoured or ashamed. ^_^

I really do think I can work up something cleaner though, taking advantage of HookKey()... hmm.

Posted on 2004-04-27 00:02:45

ThinIce

I say throw the kiddies in DOS MODE! MWAHAH!

Posted on 2004-04-27 03:46:30


Displaying 1-11 of 11 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.