Warning: include(/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php): failed to open stream: No such file or directory in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Warning: include(): Failed opening '/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Notice: Undefined index: OFPEC in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152
    Home   Help Login Register  

Author Topic: Waypoints condition problem  (Read 2092 times)

0 Members and 1 Guest are viewing this topic.

Offline BlackJackVr

  • Members
  • *
Waypoints condition problem
« 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

Offline Cheetah

  • Former Staff
  • ****
Re: Waypoints condition problem
« Reply #1 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.
Like missions? Help with Beta Testing! or take a look at the OFPEC Missions Depot for reviewed missions!

Offline BlackJackVr

  • Members
  • *
Re: Waypoints condition problem
« Reply #2 on: 01 Mar 2007, 11:17:30 »
Ok, now it works perfectly, thanks.

But why the waypoints conditions don't work??

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re: Waypoints condition problem
« Reply #3 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.
Plenty of reviewed ArmA missions for you to play