{USI}_Zombie 0 Posted August 10, 2007 I need a way to detect if a player has left a certain area. Using a trigger, for example, I put an east player in the area, then the trigger was set to opfor not present. Works great...but in that said area I will have more than 1 opfor there usually. So how do I set it up so only a specific unit fires the trigger? Also, I need a way to notify THAT unit he has left the area, but not broadcast to the whole team/server. Should be an easy concept but can't seem to get it. Share this post Link to post Share on other sites
fasad 1 Posted August 10, 2007 Subtract the list of a opfor present trigger (with no on activation or condition) from an array of all opfor player units to get an array of opfor player units outside the trigger. I imagine that JIP and locality will complicate things, i can't really help with that... Share this post Link to post Share on other sites
HulkingUnicorn 0 Posted August 10, 2007 As for making sure only the right player gets the message: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">if (!(isServer) && (local yourUnit)) then {hint "You're being led astray! Seek guidance ye poor soul!"}; This is assuming the code runs on all clients (so if you're using an editor placed trigger you should be fine). Share this post Link to post Share on other sites
mtlgd 0 Posted August 10, 2007 Try  triggerAttachVehicle. Its sets the vehicle (or player IIRC) that will activate the trigger. Share this post Link to post Share on other sites
b1sh0p 0 Posted August 10, 2007 Or you could group the trigger to the unit you want to activate the trigger, and select "vehicle" instead of "opfor". This probably works the same as triggerattatchvehicle. Share this post Link to post Share on other sites
leehunt27 1 Posted August 15, 2007 yeh b1sh0p's solution works the best. Press F2 and drag a line from the trigger to the unit desired. Share this post Link to post Share on other sites
dmarkwick 261 Posted August 15, 2007 Always amazes me how there's many ways of doing the job. Quite obviously the group with trigger sounds the best, I would have tried some code that looks for a unit name in the Condition field Share this post Link to post Share on other sites