Page 1 of 1
					
				 Event autoDetectable
				Posted: Fri Oct 15, 2021 12:22 pm
				by Parel803
				 My question might not be Lua but I cannot find what I'm doing wrong.
 I made an event for civilian air, remain in area and was hoping that units, coming form Airfields, changed to Autodetectable. I had it working in a small test scenario but seems I'm doing something wrong here. Hoping someone sees waht it is.
 The Event is: Civilian Air - AutoID 5 sec in area
 best regards Gert-Jan
 
			 
			
					
				 RE: Event autoDetectable
				Posted: Fri Oct 15, 2021 10:48 pm
				by KnightHawk75
				 The problem appears you are relying on the UnitRemainsInArea trigger to actually process _each_ /all units that qualifies the match param.  It will not, it will process the first one it finds that matches the rule (which will always be the same unless it specifically lands or leaves the area) and stop executing. You would have to set a trigger for each single unit you wanted tracked for UnitRemainsInArea.  You could if you don't need it really to be time-inside dependent just use UnitEntersArea, which will process each one (eventually). If you do need it to be time-inside dependent and don't want to create a trigger for each, then there are workarounds via creating your own tracker via regular-time trigger and tracking time and inside|outside yourself, but I'll save the details on that unless you need them as I'm thinking UnitEntersArea probably address what you want for the scene involved.
 
			 
			
					
				 RE: Event autoDetectable
				Posted: Sat Oct 16, 2021 12:14 pm
				by Parel803
				 KH thank you. I misunderstood. It's not really time depending, and wanted to (sort of) simulate the IFF and that those airliners are civ neutral. So I'll try with the unitEntersArea.
 regards GJ