OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: BlackJackVr on 01 Mar 2007, 10:10:45

Title: Waypoints condition problem
Post by: BlackJackVr on 01 Mar 2007, 10:10:45
Hello, i've a problem in using conditions of waypoints:

I have set a waypoint condition to: finished==1
I have set the init of my player to: finished=0
I have set a trigger OnActivation to: finished=1

But when i play the mission i always see the waypoint, also if the trigger isn't activated yet (so the variable should be set to 0).

I'm not able to undesrtand why.

Thanks
Title: Re: Waypoints condition problem
Post by: Cheetah on 01 Mar 2007, 10:38:03
Waypoint conditions aren't reliable and there is a far easier method you can use to accomplish the same. I suggest that you delete the finished=X stuff altogether and after that do this:
Synchronize the waypoint prior to the waypoint which should go active after a condition has been met, with the trigger that activates once his condition line is true. Do this with F5 and then draw a line between the trigger and waypoint prior to the waypoint you want to hide.

See attached image.
Title: Re: Waypoints condition problem
Post by: BlackJackVr on 01 Mar 2007, 11:17:30
Ok, now it works perfectly, thanks.

But why the waypoints conditions don't work??
Title: Re: Waypoints condition problem
Post by: macguba on 01 Mar 2007, 11:44:44
Because computers are rubbish.     :D   It's a rounding error.    Once 1 has been thrown around the machine for a while there is a good chance it is actually 1.00000000000000001.   

Never use "==x" where x is a number, it's not going to work except occasionally by accident.   Use true and false instead.

set a waypoint condition to: finished
set the init of my player to: finished=false
set a trigger OnActivation to: finished=true

But that's just for explanation, go with Cheetah's answer.