Editors Depot - Mission Editing and Scripting > OFP - Editing/Scripting General

Waypoint Condition Help

(1/1)

NoVertigo:
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.

SoldierEPilot:
Condition:
Variable==1

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

savedbygrace:
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.

Navigation

[0] Message Index

Go to full version