- Joined
- Feb 7, 2005
- Messages
- 409
alright so, I set up a unit group at map init to refer to all sub units under control of a commander.
GenMinGroups
I then have a trigger that sets a temp unit group to that group
set Set TempGroup = GenMinGroups[(LeaderNumber[(Player number of (Owner of (Ordered unit)))] + (Point-value of (Ordered unit)))]
The trigger then fires using TempGroup to refer to it (instead of doing the LeaderNumber blah blah blah)
After the trigger's done if I destroygroup the tempgroup, it destroys my genmingroups as well. So I just don't destroygroup it. While playing it doesn't appear to cause lag but I'm afraid on a bnet game the trigger will leak and lag it up.
Is this causing leaks, should I leave it as is? or should I readjust it?
Here's the trigger in full using Amigurumi Group System: https://www.hiveworkshop.com/forums...29343/?prev=search=Group%20System&d=list&r=20 but editing it to suit my needs.
GenMinGroups
I then have a trigger that sets a temp unit group to that group
set Set TempGroup = GenMinGroups[(LeaderNumber[(Player number of (Owner of (Ordered unit)))] + (Point-value of (Ordered unit)))]
The trigger then fires using TempGroup to refer to it (instead of doing the LeaderNumber blah blah blah)
After the trigger's done if I destroygroup the tempgroup, it destroys my genmingroups as well. So I just don't destroygroup it. While playing it doesn't appear to cause lag but I'm afraid on a bnet game the trigger will leak and lag it up.
Is this causing leaks, should I leave it as is? or should I readjust it?
Here's the trigger in full using Amigurumi Group System: https://www.hiveworkshop.com/forums...29343/?prev=search=Group%20System&d=list&r=20 but editing it to suit my needs.
-
Group Order units order
-

Events
-


Unit - A unit Is issued an order with no target
-


Unit - A unit Is issued an order targeting an object
-


Unit - A unit Is issued an order targeting a point
-
-

Conditions
-


(Issued order) Equal to (Order(smart))
-


Or - Any (Conditions) are true
-



Conditions
-




(Unit-type of (Ordered unit)) Equal to Mounted General Human
-




(Unit-type of (Ordered unit)) Equal to Mounted General Nelf
-




(Unit-type of (Ordered unit)) Equal to Mounted General Orc
-




(Unit-type of (Ordered unit)) Equal to Mounted General Undead
-
-
-
-

Actions
-


Trigger - Turn off (This trigger)
-


Hashtable - Clear all child hashtables of child (Key (Ordered unit)) in Hash_Pathing
-


Set GGroup[1] = GenMinGroups[(LeaderNumber[(Player number of (Owner of (Ordered unit)))] + (Point-value of (Ordered unit)))]
-


-------- Order: No target --------
-


Custom script: call GroupImmediateOrder( udg_GGroup[1], OrderId2String(GetIssuedOrderId()) )
-


-------- Order: Object --------
-


Custom script: call GroupTargetOrder( udg_GGroup[1], OrderId2String(GetIssuedOrderId()), GetOrderTargetUnit() )
-


Hashtable - Save Handle Of(Target unit of issued order) as 3 of (Key (Ordered unit)) in Hash_Pathing
-


-------- Order: Destructables --------
-


Custom script: call GroupTargetOrder( udg_GGroup[1], OrderId2String(GetIssuedOrderId()), GetOrderTargetDestructable() )
-


-------- Order: Items --------
-


Custom script: call GroupTargetOrder( udg_GGroup[1], OrderId2String(GetIssuedOrderId()), GetOrderTargetItem() )
-


-------- Order: Point --------
-


Set GPoint[1] = (Target point of issued order)
-


Hashtable - Save (X of GPoint[1]) as 1 of (Key (Ordered unit)) in Hash_Pathing
-


Hashtable - Save (Y of GPoint[1]) as 2 of (Key (Ordered unit)) in Hash_Pathing
-


Custom script: call GroupPointOrderLoc( udg_GGroup[1], OrderId2String(GetIssuedOrderId()), udg_GPoint[1] )
-


Custom script: call RemoveLocation(udg_GPoint[1])
-


Trigger - Turn on (This trigger)
-
-




