new keys?
Moderator: Moderators
new keys?
i must have asked this before but a search didnt find anything and i sure forgot whatever info i got from it.
i want to make a new control key, like +primaryfire and +moveleft, but i want it to be custom. such as !myKey
what i want:
i'm making a squad SP mod that's pretty simple atm, but i need to have the "floating keypad" (home end delete pageup pagedown) to control the squad in certain ways. but there are no spare controls like +use i can use effectively. so i want to make new controls like !squadAdvance and !squadMove, but i dont know how.
is this possible?
i want to make a new control key, like +primaryfire and +moveleft, but i want it to be custom. such as !myKey
what i want:
i'm making a squad SP mod that's pretty simple atm, but i need to have the "floating keypad" (home end delete pageup pagedown) to control the squad in certain ways. but there are no spare controls like +use i can use effectively. so i want to make new controls like !squadAdvance and !squadMove, but i dont know how.
is this possible?
Moderator
۞
Abyssus pro sapientia
Olympus pro Ignarus
۞
AND STUFF™ © 2006
۞
Abyssus pro sapientia
Olympus pro Ignarus
۞
AND STUFF™ © 2006
-
Rookie One.pl
- Site Admin
- Posts: 2752
- Joined: Fri Jan 31, 2003 7:49 pm
- Location: Nowa Wies Tworoska, Poland
- Contact:
-
Rookie One.pl
- Site Admin
- Posts: 2752
- Joined: Fri Jan 31, 2003 7:49 pm
- Location: Nowa Wies Tworoska, Poland
- Contact:
Let's say you want to use the "squadcommand" cvar for your squad commands. Now you can bind directly cvars to keys or make aliases from the console:
And then in the scr:
Code: Select all
alias squad_followme "set squadcommand followme"
alias squad_coveringfire "set squadcommand coveringfire"
bind PGUP squad_followme
bind PGDOWN squad_coveringfireCode: Select all
while (1)
{
if (getcvar(squadcommand) != "")
{
switch(getcvar(squadcommand))
{
case "follow"
//whatever
//etc. etc.
}
}
waitframe
}
-
Rookie One.pl
- Site Admin
- Posts: 2752
- Joined: Fri Jan 31, 2003 7:49 pm
- Location: Nowa Wies Tworoska, Poland
- Contact:
doesn't work. i used this in my script...
and all of them returned errors. bind and alias both. said something about ScriptMAster and not doing something.
Code: Select all
alias squad_hold "set squadcommand hold"
alias squad_coveringFire "set squadcommand coveringFire"
alias squad_follow "set squadcommand followme"
alias squad_advance "set squadcommand advance"
alias squad_regroup "set squadcommand regroup"
alias clear "set squadcommand "
bind HOME squad_hold
bind END squad_coveringFire
bind DEL squad_follow
bind PGUP squad_advance
bind PGDN squad_regroup
bind INS clearModerator
۞
Abyssus pro sapientia
Olympus pro Ignarus
۞
AND STUFF™ © 2006
۞
Abyssus pro sapientia
Olympus pro Ignarus
۞
AND STUFF™ © 2006
-
Master-Of-Fungus-Foo-D
- Muffin Man
- Posts: 1544
- Joined: Tue Jan 27, 2004 12:33 am
- Location: cali, United States
didnt rookie say put this in console?
Now you can bind directly cvars to keys or make aliases from the console
alias squad_hold "set squadcommand hold"
alias squad_coveringFire "set squadcommand coveringFire"
alias squad_follow "set squadcommand followme"
alias squad_advance "set squadcommand advance"
alias squad_regroup "set squadcommand regroup"
alias clear "set squadcommand "
bind HOME squad_hold
bind END squad_coveringFire
bind DEL squad_follow
bind PGUP squad_advance
bind PGDN squad_regroup
bind INS clear
anything you put in script OUGHT to work from console.
ok new approach, how do i write to unnamedsoldier.cfg and add the binds there... i can just make the aliases in the script later, or try writing them too.

local.master... hmm
ok new approach, how do i write to unnamedsoldier.cfg and add the binds there... i can just make the aliases in the script later, or try writing them too.
no it's a problem with the command, not the key.Maybe it's e.g. KP_HOME instead of HOME (like in my unnamedsoldier.cfg) and maybe the aliases need the local.master stuff?! No idea here, so sorry for talking nonsense
local.master... hmm
Moderator
۞
Abyssus pro sapientia
Olympus pro Ignarus
۞
AND STUFF™ © 2006
۞
Abyssus pro sapientia
Olympus pro Ignarus
۞
AND STUFF™ © 2006
-
Master-Of-Fungus-Foo-D
- Muffin Man
- Posts: 1544
- Joined: Tue Jan 27, 2004 12:33 am
- Location: cali, United States
not sure alias is what i need.
and bind looks like it's trying to bind an entity to an entity.
so it looks like i'm back at square one.
Code: Select all
alias( String alias, String realPath, [ String arg1 ], [ String arg2 ], [ String arg3 ], [ String arg4 ], [ String arg5 ], [ String arg6 ] )
Create an alias to the specified pathso it looks like i'm back at square one.
Moderator
۞
Abyssus pro sapientia
Olympus pro Ignarus
۞
AND STUFF™ © 2006
۞
Abyssus pro sapientia
Olympus pro Ignarus
۞
AND STUFF™ © 2006
-
Rookie One.pl
- Site Admin
- Posts: 2752
- Joined: Fri Jan 31, 2003 7:49 pm
- Location: Nowa Wies Tworoska, Poland
- Contact:



