Author Topic: Segfault "if" statements help  (Read 7737 times)

GeneralScott

  • Posts: 291
  • Turrets: +3/-8
Segfault "if" statements help
« 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

UniqPhoeniX

  • Spam Killer
  • *
  • Posts: 1376
  • Turrets: +66/-32
Re: Segfault "if" statements help
« Reply #1 on: November 16, 2010, 09:12:52 pm »
Pretty sure it's broken.

GeneralScott

  • Posts: 291
  • Turrets: +3/-8
Re: Segfault "if" statements help
« Reply #2 on: November 16, 2010, 10:37:52 pm »
Meh. Well it says it works on the site.

SlackerLinux

  • Spam Killer
  • *
  • Posts: 555
  • Turrets: +41/-62
Re: Segfault "if" statements help
« Reply #3 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)
Slackware64 13.1
SlackersQVM/

GeneralScott

  • Posts: 291
  • Turrets: +3/-8
Re: Segfault "if" statements help
« Reply #4 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.

Plague Bringer

  • Posts: 3815
  • Turrets: +147/-187
Re: Segfault "if" statements help
« Reply #5 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!"
U R A Q T

GeneralScott

  • Posts: 291
  • Turrets: +3/-8
Re: Segfault "if" statements help
« Reply #6 on: November 17, 2010, 03:38:44 pm »
Lol. Does that really work or is it just you bieng funnY?

UniqPhoeniX

  • Spam Killer
  • *
  • Posts: 1376
  • Turrets: +66/-32
Re: Segfault "if" statements help
« Reply #7 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  ???
« Last Edit: November 17, 2010, 07:50:06 pm by UniqPhoeniX »

GeneralScott

  • Posts: 291
  • Turrets: +3/-8
Re: Segfault "if" statements help
« Reply #8 on: November 17, 2010, 08:11:05 pm »
The question is, how to use it?
Examples please...?