Jump to content

Recommended Posts

I'm working on a mission in the editor where two helicopters flying together are shot down.  The passengers of one helicopter survive the crash, the crew of their helicopter obviously dead, and are assigned the task of searching the other helicopter's crash site for survivors.

 

My problem is that the other helicopter doesn't always crash in the same spot so creating a simple trigger that completes the task when the player enters the trigger zone (the area immediately surrounding the crash site) won't work.

 

What I need to script in the trigger is something like (say the other helicopter is given the variable name "bird") "player within a 10 meter radius of bird;" but I can't figure out how to do this.  Is there a command that does this?  What other possible workarounds are there?

 

Thanks.

  • Like 1

Share this post


Link to post
Share on other sites

You can attach your trigger on helo, so its area will move with the helo:

in init field of the helo, sat helo2: yourTriggerName attachTo [helo2,[0,0,0]];

 

or, as you said, you don't care of the trigger area, (let it none, none as well), and your trigger is a simple condition checked every 0.5 second:

in cond field:

player distance helo2 < 10

or in MP:

{_x distance helo2 < 10} count allPlayers > 0

  • Like 1

Share this post


Link to post
Share on other sites
9 hours ago, pierremgi said:

You can attach your trigger on helo, so its area will move with the helo:

in init field of the helo, sat helo2: yourTriggerName attachTo [helo2,[0,0,0]];

 

. . .

 

Wonderful.  Thanks!

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

×