Tremulous Forum

Mods => Mod Releases => Non-Gameplay Changing => Topic started by: GeneralScott on November 16, 2010, 09:03:12 pm

Title: Segfault "if" statements help
Post by: GeneralScott on November 16, 2010, 09:03:12 pm
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
Title: Re: Segfault "if" statements help
Post by: UniqPhoeniX on November 16, 2010, 09:12:52 pm
Pretty sure it's broken.
Title: Re: Segfault "if" statements help
Post by: GeneralScott on November 16, 2010, 10:37:52 pm
Meh. Well it says it works on the site.
Title: Re: Segfault "if" statements help
Post by: SlackerLinux on November 17, 2010, 12:21:31 am
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)
Title: Re: Segfault "if" statements help
Post by: 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.
Title: Re: Segfault "if" statements help
Post by: Plague Bringer on November 17, 2010, 03:17:19 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!"
Title: Re: Segfault "if" statements help
Post by: GeneralScott on November 17, 2010, 03:38:44 pm
Lol. Does that really work or is it just you bieng funnY?
Title: Re: Segfault "if" statements help
Post by: UniqPhoeniX on November 17, 2010, 07:45:27 pm
This thread is so full of fail. It's supposed to be
Code: [Select]
/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  ???
Title: Re: Segfault "if" statements help
Post by: GeneralScott on November 17, 2010, 08:11:05 pm
The question is, how to use it?
Examples please...?