OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Mike on 07 Sep 2002, 05:06:27

Title: Objective Done/Failed
Post by: Mike on 07 Sep 2002, 05:06:27
     Ok Heres what I have and need to do:

I have a group of shilkas that are an objective to destroy. I have it set up so when all the four tanks are not " !alive " then the objective has been completed. (works fine) Due to a load of enemy tanks that will come by the area the player will be in, I have made a "Broken Arrow" trigger to radio call in 2 AH1's and take out what ever they can..

My problem is in the radio support trigger.  I want the Objective to kill the shilkas to fail if the player calls the AH1's for help.  That I have accomplished, but if and when the two AH1's kill the four shilkas it switches the objective to DONE instead of staying Failed.

How can I make the Victory Trigger check if the other has been activated?  ???   :help:


Thank you kindly  :toocool:
Title: Re:Objective Done/Failed
Post by: Wolfrug on 07 Sep 2002, 09:26:06
In the trigger that looks for the dead shilkas (!alive shilka1 && !alive skilka2...), just add a & !brokenArrow at the end. I.e, when you call the AH1's, a variable becomes true, brokenArrow=true. Now, for the shilka trigger to activate, this variable must be false ((not)brokenarrow), so thus, if it's true, the trigger can't activate  ;)

On the other hand...if the objective is to destroy the Shilkas, and the AH1's do the job...why the failed mission?  ::) A suggestion would be to make sure the Shilka's are skilled enough to take out most of the AH1's if you call them before the Shilka's are destroyed.

Ah well.  :D G'luck!

Wolfrug out.
Title: Re:Objective Done/Failed
Post by: Messiah on 07 Sep 2002, 11:04:29
this variable must be false ((not)brokenarrow),

im pretty sure that you can't check for a variable that has not been actiavted - since the variable does not exist yet and so the game cannot work out a 'not' condition for it.

best thing to do is use anothe rvariable and make it true at the start of the game (init.sqs) - then you can make it false later on to simulate the same thing

:thumbsup:
Title: Re:Objective Done/Failed
Post by: Wolfrug on 07 Sep 2002, 21:39:33
Hah! That's where you're wrong, mister!  :booty: Any variable that doesn't exist is automatically "FALSE". Hm, I think. If it for some reason doesn't work, just do as Messiah says. Only make the init.sqs line something like

brokenarrow=FALSE

and it'll work just as I told ya  :thumbsup:

I hope.  :beat: (otherwise do like Mezzy there rambled...still the same thing tho, only...uhm, inverted.)

Wolfrug out.
Title: Re:Objective Done/Failed
Post by: Mike on 08 Sep 2002, 05:46:58
Thanks Ill test it out..

On the other hand...if the objective is to destroy the Shilkas, and the AH1's do the job...why the failed mission?

Reason, You shouldnt need to call for support to win, just there for the not so skilled players. Its a tough mission.  ;D

A suggestion would be to make sure the Shilka's are skilled enough to take out most of the AH1's if you call them before the Shilka's are destroyed.

It is  ;)    2 full skilled AH1's v.s. 4 low skill shilkas.. I tested it 2 times, one time it killed all 4 the other only 1.. Makes for a nice show.  :gunman:


Ok so what I have done is:

1) made a script (BrokenArrow=FALSE)

2) activated the script (duh)  :beat:

3) put !BrokenArrow in the condition of the shilkas dead trigger

4) put BrokenArrow=true In the Broken Arrow radio trigger


It should work.. sounds right as far as I know..  ;D  :cheers: