Jump to content

Home

Scripting


Garik Loran

Recommended Posts

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?

e.g.:

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

-colorattack command.

Any ideas?

(I know this script isn't very useful, but I'd like to know how this works in generel).

Link to comment
Share on other sites

Try:

 

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...

Link to comment
Share on other sites

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)

Link to comment
Share on other sites

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

-- Aetherfukz

 

 

The Force is my ally (and a powerful ally it is.)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...