xoxdragonxox
New Member
- Reaction score
- 1
Does it leak? Can anyone help me improve it so it runs more efficiently? and thanks + Rep!
Trigger:
- On and Off
- Events
- Unit - A unit Uses an item
- Conditions
- (Item-type of (Item being manipulated)) Equal to Light
- Actions
- Item - Remove (Item being manipulated)
- Set T_Angle = (Facing of (Triggering unit))
- Set T_Loc = (Position of (Triggering unit))
- Set T_Loc2 = (T_Loc offset by 500.00 towards T_Angle degrees)
- Unit - Create 1 LightEffect for (Owner of (Triggering unit)) at T_Loc2 facing T_Angle degrees
- Set T_Light = (Last created unit)
- Unit - Turn collision for T_Light Off
- Unit Group - Add (Triggering unit) to T_Holders
- Hashtable - Save Handle OfT_Light as (Key light) of (Key (Triggering unit)) in T_Hashtable
- Set T_isOn = True
- Hashtable - Save T_isOn as (Key boolean) of (Key (Triggering unit)) in T_Hashtable
- Custom script: call RemoveLocation (udg_T_Loc)
- Custom script: call RemoveLocation (udg_T_Loc2)
- Events
Trigger:
- Move
- Events
- Time - Every 0.04 seconds of game time
- Conditions
- (Number of units in T_Holders) Greater than 0
- Actions
- Unit Group - Pick every unit in T_Holders and do (Actions)
- Loop - Actions
- Set T_Angle = (Facing of (Picked unit))
- Set T_Loc = (Position of (Picked unit))
- Set T_Loc2 = (T_Loc offset by 500.00 towards T_Angle degrees)
- Set T_Light = (Load (Key light) of (Key (Picked unit)) in T_Hashtable)
- Unit - Move T_Light instantly to T_Loc2
- Custom script: call RemoveLocation (udg_T_Loc)
- Custom script: call RemoveLocation (udg_T_Loc2)
- Loop - Actions
- Unit Group - Pick every unit in T_Holders and do (Actions)
- Events