DuelPlayer
Member
- Reaction score
- 21
First question:
Whats wrong with this trigger???
Basically this spell has 500 aoe and when casted all enemy units in the aoe get moved to middle. And i normally used Set (variable) = (Load 0 of 0 in (Last created hashtable)) to remove leaks, well do not comment it in first question. The main problem is that when i first casted it happen as i expected but when i cast it 2nd, 3rd ... times sometimes only one unit moved to middle and received the damage. Help me look if i missed out any leaks or bug. Btw, this spell is MUI. And all triggers using the variables in this trigger are MUI too.
2nd Question:
Just asking!!
Is
Same as custom script removal of variables?
Because if it is not found in hashtable, so i expect it to be null
3rd Question:
Is there any ways to detect that a tree died? In event?
Because i saw the event
But there is a note it only works for first 64 trees it detected.
I was thinking to pick all trees in entire map and add in the event of Destructible - (Picked destructibles) dies
But i was afraid that pick destructibles only work for first 64 picked destructibles.
Lastly, if you help me solve +rep :thup:
Whats wrong with this trigger???
Trigger:
- Storm Field
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- (Ability being cast) Equal to Storm Field
- Actions
- Set Temp_Point[1] = (Target point of ability being cast)
- Set Temp_Player[1] = (Owner of (Triggering unit))
- Set Temp_Unit_Group[1] = (Units within 500.00 of Temp_Point[1] matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is A structure) Equal to False) and (((Owner of (Matching unit)) is an enemy of (Owner of (Triggering unit))) Equal to True))))
- Destructible - Pick every destructible within 500.00 of Temp_Point[1] and do (Actions)
- Loop - Actions
- Destructible - Kill (Picked destructible)
- Loop - Actions
- For each (Integer A) from 1 to 8, do (Actions)
- Loop - Actions
- Set Temp_Real[1] = (Temp_Real[1] + 45.00)
- Set Temp_Point[2] = (Temp_Point[1] offset by 500.00 towards Temp_Real[1] degrees)
- Unit - Create 1 Storm Bolt Dummy for Temp_Player[1] at Temp_Point[2] facing Temp_Point[1]
- Unit - Order (Last created unit) to Move To Temp_Point[1]
- Unit - Add a 1.25 second Generic expiration timer to (Last created unit)
- Set Temp_Point[2] = (Load 0 of 0 in (Last created hashtable))
- Loop - Actions
- Unit - Create 1 Dummy Caster for Temp_Player[1] at Temp_Point[1] facing Default building facing degrees
- Unit - Add Dummy Force Field Stun (Neutral Hostile 1) to (Last created unit)
- Unit - Set level of Dummy Force Field Stun (Neutral Hostile 1) for (Last created unit) to (Level of Storm Field for (Triggering unit))
- Unit - Order (Last created unit) to Orc Tauren Chieftain - War Stomp
- Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
- For each (Integer A) from 0 to (Number of units in Temp_Unit_Group[1]), do (Actions)
- Loop - Actions
- Set Temp_unit[1] = (Random unit from Temp_Unit_Group[1])
- Set Temp_Point[2] = (Position of Temp_unit[1])
- Unit - Move Temp_unit[1] instantly to Temp_Point[1]
- Unit - Cause (Casting unit) to damage Temp_unit[1], dealing (100.00 + ((500.00 - (Distance between Temp_Point[2] and Temp_Point[1])) / 2.00)) damage of attack type Spells and damage type Normal
- Unit Group - Remove Temp_unit[1] from Temp_Unit_Group[1]
- Set Temp_unit[1] = (Load 0 of 0 in (Last created hashtable))
- Set Temp_Point[2] = (Load 0 of 0 in (Last created hashtable))
- Loop - Actions
- Set Temp_Real[1] = 0.00
- Set Temp_Point[1] = (Load 0 of 0 in (Last created hashtable))
- Unit Group - Remove all units from Temp_Unit_Group[1]
- Set Temp_Unit_Group[1] = (Load 0 of 0 in (Last created hashtable))
- Events
Basically this spell has 500 aoe and when casted all enemy units in the aoe get moved to middle. And i normally used Set (variable) = (Load 0 of 0 in (Last created hashtable)) to remove leaks, well do not comment it in first question. The main problem is that when i first casted it happen as i expected but when i cast it 2nd, 3rd ... times sometimes only one unit moved to middle and received the damage. Help me look if i missed out any leaks or bug. Btw, this spell is MUI. And all triggers using the variables in this trigger are MUI too.
2nd Question:
Just asking!!
Is
Trigger:
- Set (variable) = (Load 0 of 0 in (Last created hashtable))
Same as custom script removal of variables?
Because if it is not found in hashtable, so i expect it to be null
3rd Question:
Is there any ways to detect that a tree died? In event?
Because i saw the event
Trigger:
- Destructible - A destructible within (Entire map) dies
But there is a note it only works for first 64 trees it detected.
I was thinking to pick all trees in entire map and add in the event of Destructible - (Picked destructibles) dies
But i was afraid that pick destructibles only work for first 64 picked destructibles.
Lastly, if you help me solve +rep :thup: