OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Hauk on 06 Jun 2005, 23:54:18

Title: setting condition=true in an external script?
Post by: Hauk on 06 Jun 2005, 23:54:18
hey everyone, haven't been making missions for over a year now, a long break from the game and its good to be back, anyway...

i have a wp whose condition is set to 'blackopplane', and i want to set  blackopplane equal to true in an external script. The problem i'm having is that whenever i try

Code: [Select]
blackopplane == true
or

Code: [Select]
blackopplane = "TRUE"
i keep getting an error message. do i have to define blackopplane in the script, or something else? i searched but couldn't find the answer, sorry  :-\

Thanks for the help  ;D

Hauk
Title: Re:setting condition=true in an external script?
Post by: Gogs on 07 Jun 2005, 00:02:46
Dude, close on both counts. It needs to be.....

Quote
blackopplane = TRUE

easy!
Title: Re:setting condition=true in an external script?
Post by: Hauk on 07 Jun 2005, 00:04:00
hahahaha, SO close!!!

Thanks very much, much appreciated, i'll lash it into the script now.

Thanks very much!

Hauk  ;D  ;D
Title: Re:setting condition=true in an external script?
Post by: Hauk on 07 Jun 2005, 00:06:48
hmmm, i put it in the script and got:

"Error reserved variable in expression"  :( ???

any ideas?

Hauk
Title: Re:setting condition=true in an external script?
Post by: UNN on 07 Jun 2005, 01:44:35
Conditions automaticaly look for a boolean, so you just need:

Code: [Select]
blackopplane
Title: Re:setting condition=true in an external script?
Post by: THobson on 07 Jun 2005, 06:38:59
To pull the pieces together:

In your script you need:

Code: [Select]
blackopplane = trueand in the condition of the waypoint you need

Code: [Select]
blackopplaneIf that is what you have and you are still getting the error message then look to see if blackopplane is defined anywhere else.  If that is not the case then I would put money on the problem being elsewhere.
Title: Re:setting condition=true in an external script?
Post by: Hauk on 07 Jun 2005, 10:40:08
ah yes that was it. I had called the plane itself 'blackopplane' which caused the problems.

Thanks for the help  ;D  ;D

Hauk