Unit remains in area ANY unit for side?
Posted: Sun Aug 12, 2018 6:57 pm
I'd like to create a unit remains in area trigger via lua, but have it set to any unit for the side without specifying the target type - ie AC/Ship/Sub/Facility etc. Is this possible?
Here is what I would like to do - targetType = 0 means any type of unit I think.
ScenEdit_SetTrigger({mode="add",type='UnitRemainsInArea',name="testtrigger2", targetfilter={TargetType = '0' , TargetSide="A"},area={1,2,3,4},TD=25})
I'm pretty sure that TargetType = 0 is what I want - if I make a trigger manually and then look at it in the lua console that is what it is, but if I try to create one with TargetType = 0 it errors - `ScenEdit_SetTrigger 0 : ,Error in TargetFilter.Type!`. Same code but with TargetType = 1 works, so does 2,3,4.
I'm modifying Angster/Typhoon/Gunners downed pilot script to allow pickup by any type of unit, since I can't get TargetType = 0 to work I making 4 different triggers for every downed pilot. Seems like too much when there could just be 1 set to any unit. Weapons and satellites wouldn't matter as they would be going to fast anyways.
Here is what I would like to do - targetType = 0 means any type of unit I think.
ScenEdit_SetTrigger({mode="add",type='UnitRemainsInArea',name="testtrigger2", targetfilter={TargetType = '0' , TargetSide="A"},area={1,2,3,4},TD=25})
I'm pretty sure that TargetType = 0 is what I want - if I make a trigger manually and then look at it in the lua console that is what it is, but if I try to create one with TargetType = 0 it errors - `ScenEdit_SetTrigger 0 : ,Error in TargetFilter.Type!`. Same code but with TargetType = 1 works, so does 2,3,4.
I'm modifying Angster/Typhoon/Gunners downed pilot script to allow pickup by any type of unit, since I can't get TargetType = 0 to work I making 4 different triggers for every downed pilot. Seems like too much when there could just be 1 set to any unit. Weapons and satellites wouldn't matter as they would be going to fast anyways.