Schwab 0 Posted July 4, 2007 I want to create a trigger which detects vehicles. So far no problem. I do that with <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _mytrigger = createTrigger["EmptyDetector", position _vehicle]; _mytrigger setTriggerArea [2, 2, 0, false]; _mytrigger setTriggeractivation["VEHICLE","PRESENT",true]; But now i want to attach this trigger to an other vehicle, which should not be detected by this trigger itself. Usually i would do that with _mytrigger triggerAttachVehicle [_vehicle]; but in my case the trigger gets active then with the vehicle its attached to and does not deactivate after that, even if i resize it to zero. Is there any way to do so ? Would prefer a way where i don't have to change the trigger in size or position. I tried the following now: I added to the Triggerstatement: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> mytrigger setTriggerstatements["count (nearestObjects [mytrigger , [""LandVehicle""], 5])>1",_triggerstring,""]; So this should only return true when 2 Landvehicles (including the 1 the trigger is attached to) are in the trigger. But when i debug count thislist of the trigger still returns 1. Why ? Ah and i had to make mytrigger global to make the nearestobjects work. I dont want to do that so i still searching for other solutions Obviously a solution with Triggers is quiet useless and i'll use _notrigger = [_vehicle] execVM "script.sqf"; with a loop in the script instead. Thanks for reading, i think i found the solution myself again Share this post Link to post Share on other sites