News:

Come Chat with us live! Learn how HERE!

Main Menu

Segfault "if" statements help

Started by GeneralScott, November 16, 2010, 09:03:12 PM

GeneralScott

Well I was thinking that I would use Segfault's "if" statement capability to make a building bind bound to MWHEELUP that is dynamic depending on what stage I'm at, but I didn't know how and my tests were not doing anything. So... how please?  ;D

UniqPhoeniX


GeneralScott

Meh. Well it says it works on the site.

SlackerLinux

it isnt broken it uses cvars so you need a stageup cvar(only one that exists afaik on the client is one for the ui and contains stageup for both sides(mmm spying i think thats fixed now) so kinda not useful)
Slackware64 13.1
SlackersQVM/

GeneralScott

oh. Well, I thought it was something more like   

vstr buildtesla "if g_humanstage 2 build tesla; else build turret"

But it's not. That would be really useful if you could do that.

Plague Bringer

Quote from: GeneralScott on November 17, 2010, 01:05:58 PM
oh. Well, I thought it was something more like   

vstr buildtesla "if g_humanstage 2 build tesla; else build turret"

But it's not. That would be really useful if you could do that.

vstr spy "if g_alienstage 2 say_team ^1AS3!"
U R A Q T

GeneralScott

Lol. Does that really work or is it just you bieng funnY?

UniqPhoeniX

#7
This thread is so full of fail. It's supposed to be
/if <variable1> <operator> <variable2> <variablethen> (<variableelse>)
valid operators are = != < > >= <=

but it always seems to think the variables are equal. It should work with values instead, and allow use of cvar substitution instead of a value.
EDIT: ok, it seems to work sometimes  ???

GeneralScott

The question is, how to use it?
Examples please...?