Scripting Help.
Melatonin
Babbler Join Date: 2003-03-15 Member: 14551Members, Constellation
<div class="IPBDescription">legit purpose :P toggle crouch</div> My keyboard has a 2 key limit, hence holding crouch togeather with left/ right and pressing jump becomes hard.
I want to make my crouch button toggelable.
Is this possible?
can anyone tell me the relevent commands, and/ or give me a code which will do the job.
thanks.
I want to make my crouch button toggelable.
Is this possible?
can anyone tell me the relevent commands, and/ or give me a code which will do the job.
thanks.
Comments
alias d1 "+duck; bind ctrl d2"
alias d2 "-duck; bind ctrl d1"
bind ctrl d1
I'm not sure it's working but i hope <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html//emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif' /><!--endemo--> (i dont use one my self)
also try search the forums for duck script if you can get search to work :/
thanks alot
If you were to change the button which you toggle with, you would have to change the script in several places.
The correct snippet would be this:
<!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->alias d1 "+duck; alias ducktoggle d2"
alias d2 "-duck; alias ducktoggle d1"
alias ducktoggle d1
bind ctrl ducktoggle<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
I think that should work <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html//emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif' /><!--endemo-->
alias duck_t "duck_on"
alias duck_on "alias duck_t duck_off; +duck; developer 1; echo Ducking enabled; developer 0"
alias duck_off "alias duck_t duck_on; -duck; developer 1; echo Standing enabled; developer 0"
bind "x" "duck_t"
Bind x to any key you want. The developer part will simply say Ducking or standing enabled in console.
2 key limit?
generaly these do not include Meta keys (ctrl, alt, shift)
combine that with binding jump to mouse... <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html//emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif' /><!--endemo--> (try popupmenu on alt)
I just suggest this b/c getting ussed to a duck toggle can be a pain (I tried ussing one for when I was sniping in DoD but eventualy had to bind it to another key so I could still have my normal duck)
If you were to change the button which you toggle with, you would have to change the script in several places.
The correct snippet would be this:
<!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->alias d1 "+duck; alias ducktoggle d2"
alias d2 "-duck; alias ducktoggle d1"
alias ducktoggle d1
bind ctrl ducktoggle<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
I think that should work <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html//emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif' /><!--endemo--> <!--QuoteEnd--> </td></tr></table><div class='postcolor'> <!--QuoteEEnd-->
well i'm not used to make scripts i just made what i could <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html//emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif' /><!--endemo-->
not realy, i'll explain xD
Start simple, a bind is function that tells HL what the key you're pressing dose.
Binds work like this "bind "KEY" "function"(more functions can be seperated be a ; )
An alias is something to replace a command with, like you don't go around saying "laughing out loud" you say "lol" which is shorter, hl does the same thing.
Simply when it hears "test" it refers to what you aliased to it.
Works like "alias "alias name(what you call it)" "function of alias2
with the lol exsample
alias lol "Laughing out load"
now try look at it again <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html//emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif' /><!--endemo-->
alias d1 "+duck; alias ducktoggle d2"
alias d2 "-duck; alias ducktoggle d1"
alias ducktoggle d1
bind ctrl ducktoggle
<!--emo&:p--><img src='http://www.unknownworlds.com/forums/html//emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif' /><!--endemo-->
Wow yeah <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html//emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif' /><!--endemo-->
...
lol
(whos gonna make the official script help topic? :o)
That is leat. People will look at your code and ask, "Did you code that yourself?"
...
lol
(whos gonna make the official script help topic? :o) <!--QuoteEnd--> </td></tr></table><div class='postcolor'> <!--QuoteEEnd-->
Nobody, because people who are ignorant on the functionality of scripts always come in and spout off how bad they are, followed by flamewars, followed by lockage. Happens every time.
That is leat. People will look at your code and ask, "Did you code that yourself?" <!--QuoteEnd--> </td></tr></table><div class='postcolor'> <!--QuoteEEnd-->
edited <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html//emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif' /><!--endemo-->
Lets give a prize to the first anti-scripter that says something!