Home   Help Search Login Register  

Author Topic: "?(_target alive == 0) : goto" how do I do this  (Read 600 times)

0 Members and 1 Guest are viewing this topic.

Lucky Ed

  • Guest
"?(_target alive == 0) : goto" how do I do this
« on: 13 Mar 2004, 23:02:58 »
I've done a bit of scripting, but a couple of years ago (yes I just got the game again  ;D )
So I wanna make a script where a tank fires upon a unit (probably a T80) and if the unit dosn't die I want it to take another target.
But I can't remember how to probably use the "?("command thing here") : "thing to do here"" with the alive command.
Now Alive returns a boolean value so what I thought was that I could do this:
?(_unit alive == 1) : goto "newtarget"
but it dosn't seem to work.

thanks in advance.
  Lucky Ed

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:"?(_target alive == 0) : goto" how do I do this
« Reply #1 on: 13 Mar 2004, 23:29:10 »
It's boolean but its true/false not 1/0.  So it would be

? alive _unit:  goto "newtarget"

but check the syntax of the alive command, I can't remember which way round it is.

Welcome to the forum!
« Last Edit: 13 Mar 2004, 23:30:22 by macguba »
Plenty of reviewed ArmA missions for you to play

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:"?(_target alive == 0) : goto" how do I do this
« Reply #2 on: 14 Mar 2004, 00:23:03 »
The syntax is as you seemed to remember mighty mac.  :D
« Last Edit: 14 Mar 2004, 00:23:17 by Artak »
Not all is lost.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:"?(_target alive == 0) : goto" how do I do this
« Reply #3 on: 14 Mar 2004, 00:47:32 »
It was a lucky guess.   ::)
Plenty of reviewed ArmA missions for you to play