Home   Help Search Login Register  

Author Topic: Waypoint Condition Help  (Read 1489 times)

0 Members and 1 Guest are viewing this topic.

Offline NoVertigo

  • Members
  • *
Waypoint Condition Help
« 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.
« Last Edit: 13 Nov 2016, 17:22:05 by NoVertigo »

Offline SoldierEPilot

  • Members
  • *
Re: Waypoint Condition Help
« Reply #1 on: 20 Nov 2016, 12:02:16 »
Condition:
Variable==1

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


Offline savedbygrace

  • Intel Depot
  • Administrator
  • *****
  • Be swift to hear...slow to speak...slow to wrath.
Re: Waypoint Condition Help
« Reply #2 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.