ESAc_matador Posted December 1, 2015 Posted December 1, 2015 (edited) I need a tool, and I dont know how to do it. Any help? I want to do something like this. If group "logistics" (with 4 trucks) is not inside a group "tanks" moving zone. Then group "tanks" stop moving I could do it via unit zone, but if that unit as part of a group is killed, the trigger will be true. So i want to use the whole group. Is this possible? At least, I am not getting error messages, but I dont understand very well the flag system here... Switched condition- time more 5 - do script mist.flagFunc.units_in_moving_zones({units = mist.makeUnitTable({'[g] logistics'}), zone_units = mist.makeUnitTable({'[g]Tanks'}), flag = 1000, radius = 3000, stopFlag = 900, zone_type = sphere, req_num = 4, interval = 10}) Switched condition - flag 1000 is true - move group Switched condition - flag 900 is true - stop group there is something wrong here.... Edited December 1, 2015 by ESAc_matador
ESAc_matador Posted December 2, 2015 Author Posted December 2, 2015 Ok, this works. ONCE mist.flagFunc.units_in_moving_zones({units = mist.makeUnitTable({'[g]logistics'}), zone_units = mist.makeUnitTable({'[g]tanks'}), flag = 1000, radius = 500, stopFlag = nil, zone_type = nil, req_num = nil, interval = nil, toggle = true}) Switched if flag 1000 true then script trigger.action.groupContinueMoving(Group.getByName('tanks')) Switched if flag 1000 false then script trigger.action.groupStopMoving(Group.getByName( 'tanks')) But these needs three triggers now, I would like to know how to compile in just one script... How to make something like. mist.flagFunc.units_in_moving_zones({units = mist.makeUnitTable({'[g]logistics'}), zone_units = mist.makeUnitTable({'[g]tanks'}), flag = 1000, radius = 500, stopFlag = nil, zone_type = nil, req_num = nil, interval = nil, toggle = true}) if trigger.misc.getUserFlag(1000) == true then trigger.action.groupContinueMoving(Group.getByName('tanks')) end if trigger.misc.getUserFlag(1000) == false then trigger.action.groupStopMoving(Group.getByName('tanks')) end Any help please please!!
ESAc_matador Posted December 3, 2015 Author Posted December 3, 2015 No one can help me here?? it is not so difficult!!! (I guess)
Recommended Posts