View previous topic :: View next topic |
Author |
Message |
catalyst
Joined: 17 Feb 2009 Posts: 26
|
Posted: Tue May 05, 2009 3:42 pm Post subject: SwimUp as the 'Use' key |
|
|
Hi,
I want to create a 'use' key for buttons (like the spacebar in Duke3D, or 'E' in Half-Life) replacing the Quake's 'Swim Up' key but I don't know where to start. I've looked through the code in client.qc but couldnt find anything helpful.
Thx in advance for any hints. |
|
Back to top |
|
 |
Spike
Joined: 05 Nov 2004 Posts: 944 Location: UK
|
Posted: Tue May 05, 2009 4:10 pm Post subject: |
|
|
If you're using DP or FTE you can check the sign of self.movement_z (after defining .vector movement;)
But really, why replace?
Do this:
stuffcmd(player, "alias +use \"impulse 34\"\n");
stuffcmd(player, "alias -use \"impulse 35\"\n");
Add code to handle impulse 34 and 35. And there you have a use button. _________________ What's a signature? |
|
Back to top |
|
 |
catalyst
Joined: 17 Feb 2009 Posts: 26
|
Posted: Tue May 05, 2009 6:48 pm Post subject: |
|
|
Spike wrote: |
But really, why replace?
|
I wanted the player to be able to set it up in the game's config menu. |
|
Back to top |
|
 |
MauveBib

Joined: 04 Nov 2004 Posts: 602
|
Posted: Tue May 05, 2009 9:47 pm Post subject: |
|
|
catalyst wrote: | Spike wrote: |
But really, why replace?
|
I wanted the player to be able to set it up in the game's config menu. |
The menu would still say "swim up" regardless of what the QC did, so that's not really that viable anyway. Plus, direct key access is difficult in QC for anything other than firing and jumping.
Definately better to go with the alias, or a +button if using DP or similar. _________________ Apathy Now! |
|
Back to top |
|
 |
|