Jump to content
Sign in to follow this  
xaoslaad

Distance trigger not working after sufficiently large distance

Recommended Posts

I have a scenario where the players are supposed to attempt to sneak into an area. If they are detected the commander they are supposed to kill runs to his chopper, takes off and heads far far away at which point they should fail the mission.

I used a trigger with an a/b axis of 0/0 (should make it global, correct?) set Activation to None, set the condition to:

baseball distance chopper > 1000 && chopper alive;

and set the rest up to end the mission.

It works great if the distance is under 700 meters, but not so well from 700-900, and not at all if I set it up to 1000. I want to set it to 1km or so as it is sufficiently far at that point, and still not a long long wait for a failure message.

Is there some requirement for the players to know where the chopper is in order for the trigger to work? or some other part of the puzzle I'm missing?

Share this post


Link to post
Share on other sites

You should note that the distance command returns distance in 3D space (so it accounts for height differences). If you know anything about basic geometry, if the chopper is flying at a significant height relative to "baseball", the distance (hypotenuse) will be a lot more (especially at 1000m) than the distance between their 2D coordinates.

If you want to check 2D distance use this:

[getPos baseball select 0,getPos baseball select 1] distance [getPos chopper select 0,getPos chopper select 1] > 1000 && alive chopper

Btw your syntax for alive was also wrong (I fixed it).

Share this post


Link to post
Share on other sites

Have you checked if the chopper is really still alive ??

Maybe it crashes (flying against a hill or trees is what the AI really likes to do if flyinHeight is to low :))

Check chopper fuel too.

distance command works fine above 700 or more meteres.

Edit: forgot to mention, don't put the (escape) waypoint outside the normal map area.

Xeno

Edited by Xeno

Share this post


Link to post
Share on other sites
Have you checked if the chopper is really still alive ??

Maybe it crashes (flying against a hill or trees is what the AI really likes to do if flyinHeight is to low :))

Check chopper fuel too.

distance command works fine above 700 or more meteres.

Edit: forgot to mention, don't put the (escape) waypoint outside the normal map area.

Xeno

Thanks both for the info. I found that out the hard way about putting the waypoint out of the map area; he just flew around the area doing crazy stunts. It is also possible that he's smashing into something. I tend to speed the mission up in preview to test and I have to slow it down once he takes off since at 4x he likes to smash into a nearby tree line.

Oh, and I was going off the top of my head on the alive chopper statement, so my apologies for messing it up; it is correct in the trigger, but all useful information from both, thanks a bunch; I'll see if I can make it work correctly.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×