Scripting Commands
Canadian_Crew
Join Date: 2002-11-14 Member: 8622Members
<div class="IPBDescription">I'm a noob at this</div> I was just looking at some of the scripts that others have posted (Ew's specifically <a href='http://www.unknownworlds.com/forums/index.php?act=ST&f=1&t=19699&hl=bind+ins)' target='_blank'>http://www.unknownworlds.com/forums/in...99&hl=bind+ins)</a> and when I tried to add it, it would not work because it tried to bind some keys (ALT, MOUSE3, and SPACE) to multiple commands so NS would only recgonize the last bind key that was used.
What I was thinking of doing is to make a script that can be switched in game for each of the different alien classes, marines, and comm.
So what I would like to know is can you bind a key that will bind several other keys? And if I am quessing correctly at how to do it?
Example (The commands are taken from Ew's script)
//Parasite (push down button to load parasite weapon, aim with mouse, release button to launch parasite and switch back to bite attack)
alias +qparasite "slot2"
alias -qparasite "+attack; wait; -attack; shortwait; slot1"
//Leap (push button to leap and it automatically switches back to bite attack...if you hold the button down it will do multiple leaps)
alias +qleap "slot3; medwait; +attack"
alias -qleap "-attack; slot1"
The rest of Ew's script is shown in the link above so I won't post it here again
what I need to know is for this last part (it isn't finished it's just an example)
bind "z" "bind g +qparasite; bind h +qleap" //for sulk to have "g" parasite and "h" leap
bind "x" "bind g +qspikes; bind h +qumbra" //for lerk to have "g" use spikes and "h" to umbra
would this work to push z to bind g/h to para/leap and then push x to change g/h to spikes/umbra and vice versa?
Thanks in advance... and If someone wants this I will post it after I get it working
Or if you know somewhere that has a good faq/guide for HL scripts let me know, the first few i found on google were just someone's finished scripts not much help in writing a new one.
What I was thinking of doing is to make a script that can be switched in game for each of the different alien classes, marines, and comm.
So what I would like to know is can you bind a key that will bind several other keys? And if I am quessing correctly at how to do it?
Example (The commands are taken from Ew's script)
//Parasite (push down button to load parasite weapon, aim with mouse, release button to launch parasite and switch back to bite attack)
alias +qparasite "slot2"
alias -qparasite "+attack; wait; -attack; shortwait; slot1"
//Leap (push button to leap and it automatically switches back to bite attack...if you hold the button down it will do multiple leaps)
alias +qleap "slot3; medwait; +attack"
alias -qleap "-attack; slot1"
The rest of Ew's script is shown in the link above so I won't post it here again
what I need to know is for this last part (it isn't finished it's just an example)
bind "z" "bind g +qparasite; bind h +qleap" //for sulk to have "g" parasite and "h" leap
bind "x" "bind g +qspikes; bind h +qumbra" //for lerk to have "g" use spikes and "h" to umbra
would this work to push z to bind g/h to para/leap and then push x to change g/h to spikes/umbra and vice versa?
Thanks in advance... and If someone wants this I will post it after I get it working
Or if you know somewhere that has a good faq/guide for HL scripts let me know, the first few i found on google were just someone's finished scripts not much help in writing a new one.
Comments
This is my job <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->
<a href='http://half-life.gamehelp.com/' target='_blank'>I AM HL</a> best HL scripting site out there <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->
and for what you want:
1) those 2 do the same thing (if they worked, which they shouldn't <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif'><!--endemo-->)
after all, spikes and site are slot2, and leap and umbra are slot3
<!--c1--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->alias +qslot2 "slot2"
alias -qslot2 "+attack; wait; -attack; shortwait; slot1"
alias +qslot3 "slot3"
alias -qslot3 "+attack; wait; -attack; shortwait; slot1"
alias gandh "bind g +qslot2; bind h +qslot3"
bind z gandh<!--c2--></td></tr></table><span class='postcolor'><!--ec2-->
ok, you can't just have your long bind like that
<!--QuoteBegin--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->bind "z" "bind g +qparasite; bind h +qleap" //for sulk to have "g" parasite and "h" leap
bind "x" "bind g +qspikes; bind h +qumbra" //for lerk to have "g" use spikes and "h" to umbra<!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
you simply have to make those 'binds' into aliases <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->
if qparasite, qleap, qspikes, and qumbra already all exist then simply make your code look like this:
<!--c1--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->alias skulkitup "bind g +qparasite; bind h +qleap" //for sulk to have "g" parasite and "h" leap
alias lerkarific "bind g +qspikes; bind h +qumbra" //for lerk to have "g" use spikes and "h" to umbra
bind z skulkitup
bind x lerkarific<!--c2--></td></tr></table><span class='postcolor'><!--ec2-->
ok, so I am odd (I am the boy who named varibles god, theDevil, and bob for coding projects <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif'><!--endemo-->)
but yah, that should work
If I am unlcear simply post up what you want clarified and I will do <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->
well, to be more precise I am going to eplain how to make em.
so first up, qparasite, qleap, and qumbra will all be the exact same thing, just with diff slot names, and possibly diff wait times.
so first up, we take qparasite:
<!--c1--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->alias +qparasite "slot2"
alias -qparasite "+attack; wait; -attack; shortwait; slot1"<!--c2--></td></tr></table><span class='postcolor'><!--ec2-->
you get the idea, switch when you press fire when you rlease and then switch back. Now we simply alter that for qslot3 (this will do both leap and umbra)
<!--c1--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->alias +qslot3 "slot3"
alias -qslot3 "+attack; wait; -attack; shortwait; slot1"<!--c2--></td></tr></table><span class='postcolor'><!--ec2-->
This code might need to be broken up into qleap and qumbra if the timming dosn't work (it will simply require changing the alias names and playing with wait times)
now for qspike, there is no point in firing 1 spike, so we will make one that switches, fires and keeps firing till you let go (I will also make a toggel switch)
<!--c1--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->alias +qspike "slot3; wait; +attack"
alias -qspike "-attack; wait; slot1"<!--c2--></td></tr></table><span class='postcolor'><!--ec2-->
I am unsure if this would work, now that I think about it (though it still might)
to make a toggel:
<!--c1--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->alias spikeon "+qspike; bind z spikeoff"
alias spikeoff "-qspike; bind z spikeon"
bind z spikeon<!--c2--></td></tr></table><span class='postcolor'><!--ec2-->
here you will have to chose the key in the script
now to put it all together(assume we have already writen qparasite, qspike, qleap; qumbra):
<!--c1--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->alias skulkitup "bind z +qparasite; bind x +qleap"
alias lerkarific "bind z +qspike; bind x +qumbra"
bind g skulkitup
bind h lerkarific<!--c2--></td></tr></table><span class='postcolor'><!--ec2-->
now, if you wanted to throw that spike toggel in there you could put it in a file called togglespike.cfg
and in you binds you put:
<!--c1--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->alias skulkitup "bind z +qparasite; bind x +qleap"
alias lerkarific "exec togglespike.cfg; bind x +qumbra"
bind g skulkitup
bind h lerkarific<!--c2--></td></tr></table><span class='postcolor'><!--ec2-->
there yah go <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->
For example, as soon as I join the alien team, I press the "0" key once and then the "1" key. This loads the aliens configs, and specifically, the skulk configs. If I want to evolve to gorge, I press the "2" key and it loads the gorge config and starts the evolving for me.
The script is based on someone else's that was posted on the forum many months ago (I can't remember the name at the moment). If you would like to implement a system like this, then say so and I will post the scripts for you when I get home.
he probably (and if you don't you should) has echos in there.
Basicaly put at the top of your cfg file
developer 1
echo script xxx loaded
developer 0
these simply let you know what is happening
you can also then have other feed back for diff things <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->
forinsance you could make those aliases also have this:
developer 1; echo z is now parasite and x is now leap; developer 0
<!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->
Anyone know where their is a good list of all the commands available? I have been having trouble finding a page that lists the commands and the actions.
Thx again
then for the rest, simply do a search in the forums for impulse and/or hotkeys (those are the rest of the odd ones)