SwimUp as the 'Use' key
Moderator: InsideQC Admins
4 posts
• Page 1 of 1
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.
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.
- catalyst
- Posts: 26
- Joined: Tue Feb 17, 2009 12:06 pm
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.
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.
- Spike
- Posts: 2892
- Joined: Fri Nov 05, 2004 3:12 am
- Location: UK
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!
-

MauveBib - Posts: 634
- Joined: Thu Nov 04, 2004 1:22 am
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest