OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: NoVertigo on 13 Nov 2016, 16:36:56

Title: Waypoint Condition Help
Post by: NoVertigo on 13 Nov 2016, 16:36:56
Hello everybody.
 
I've been having some trouble with Waypoint condition blocks. I would rather actually say that im having trouble scripting to test if a variable is set to a certain integer.
 
My problem lies as such:
 
Waypoint 1 Condition Block : See if _Variable = 1
 
If it is, Go to Waypoint 2. So pretty much I put a trigger to set variable = 1, and when the group reaches the waypoint with the condition they do not move at all to the next waypoint. How can I script a block to check if a variable is set to a certain integer.
 
 
Thank you in advanced.
Title: Re: Waypoint Condition Help
Post by: SoldierEPilot on 20 Nov 2016, 12:02:16
Condition:
Variable==1

Do not use _localVars;
"=" means assign, "==" means equal.

Title: Re: Waypoint Condition Help
Post by: savedbygrace on 08 Jan 2017, 04:38:46
The guy has not come back to reply?
The condition field of waypoints and triggers only requires the variable name and scripts require the actual code. In this case we'll use your nic as a tag prefix.

Waypoint/Trigger Condition:  NoVert_move1
You must set "NoVert_Move1" to false (NoVert_move1 = false) in either the init.sqs (preferable) or the init field of an object.
Then in the OnActivation field of the trigger (NoVert_move1 = true) allows the squad to continue on.

For multiple variables use (NoVert_move1 && NoVert_move2 && NoVert_move3) in the Condition field.

I must forewarn you though. Cold War Assault(Operation Flashpoint) is limited in the amount of global variables it will handle during a save. So be very frugal with them.