Jump to content
Sign in to follow this  
phronk

How to check if unit is in area?

Recommended Posts

I'm creating a hostage rescue mission where the hostage's spawn location is somewhat randomized (grouped the unit to a few invisible markers in different areas). However, I'm stuck at the part where the players (rescuers are players, hostage is AI, enemy holding the hostage is AI) can actually rescue the hostage. I'm aware of how to make it so they can be rescued if in a single area, but I don't know the method of how to do this if they can be somewhere else.

Is there a way to create a 1x1 radius trigger that is attached to the hostage unit? How can I check if the hostage unit is within an area or how do I make it so that if hostage is in an area, and blufor comes within 1 radius of that unit, hostage joins their group?

I'd really appreciate any help! :)

Share this post


Link to post
Share on other sites

Make your trigger however big you want it. Then attach the trigger to the hostage. It'll follow the hostage.

triggerName attachTo [hostageName, [0,0,0]];

Share this post


Link to post
Share on other sites

You're the man! Thanks a ton!

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  

×