View Full Version : Scripting
05-03-2002, 06:58 PM
I have a question for scripts. I used to make some for HL, but in Q3 engine games it's different.
Here's my problem:
How do I make scripts that execute a command and stops when I stop pushing the button?
the attack command has +attack for a pushed button and -attack when you stop pushing the key.
I'd like to make something like
set +colorattack "color1 4; +attack"
set - colorattack "-attack"
bind x "vstr +colorattack"
But this doesn't work, the programm doesn't accept the
(I know this script isn't very useful, but I'd like to know how this works in generel).
05-04-2002, 02:37 PM
Hmm, seems you have as many ideas to solve this as I had.
Does anybody know if there is a way to do such a +/- script?
05-04-2002, 02:40 PM
Script editor isn't out yet, so people haven't had a change to script.
05-05-2002, 10:31 AM
bind x "vstr colorattack"
set colorattack "<command;command>;"
First bind colorattack. then tell the engine what colorattack is (string of commands after set colorattack "<commands>;" all seperated by semicolons...
You may have to create more commands like colorattack for each switch, but maybe someone else has a better idea...
05-05-2002, 11:02 AM
Yeah, this works, BUT: the problem is that when I push the button +attack is executed and my character doesn't stop attacking. So I need a -attack, and this should be executed when I stop pushing the button, but how do I do that?
Binding a command that is executed when I stop pushing a button, that must be possible.
It was possible in HL (Q2 engine) with +blabla and -blabla. but it seems this doesn't work in Q3engine because of the vstr string.
Please give me a hint, so I can release some cool scripts (nothing that unbalances the game)
05-06-2002, 12:21 AM
I am sory, but I am fairly sure that this cannot be done.
05-06-2002, 11:45 AM
Hmmm. Weird, because it worked so well in Half-Life.
05-06-2002, 06:42 PM
I, too, would need this to do some cool things with scripts. But I think this isn't possible without the source, because it seems +blabla and -blabla can only be bind if they are functions, like +attack, it surely hits some function that knows what to do now...
"Still waiting for the source code..."
Peace & Respect
The Force is my ally (and a powerful ally it is.)
vBulletin®, Copyright ©2000-2015, Jelsoft Enterprises Ltd.