- Joined
- Sep 27, 2011
- Messages
- 141
I have checked that the damage amount is correct and the damage unit group runs because the special effects are created. I know im terrible with local variables because i never use them but this is just ment to be a quick map for me and my friend otherwise i would do it without the wait so can someone please help me and tell me why it does not do damage.
-
Thunder Palace
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Thunder Palace
-
Actions
- Custom script: local unit udg_TempUnit
- Custom script: local location udg_Temp_Loc
- Custom script: local real udg_Damage
- Set TempUnit = (Triggering unit)
- Set Temp_Loc = (Position of TempUnit)
- Set Temp_Real = (Mana of TempUnit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Temp_Real Greater than or equal to 500.00
-
Then - Actions
- Unit - Pause TempUnit
- Set Temp_Real = (Temp_Real x 0.01)
- Set Damage = ((40.00 + (10.00 x (Real((Level of Thunder Palace for TempUnit))))) x (Real((Integer(Temp_Real)))))
- Unit - Set mana of TempUnit to 0.00
- Set Temp_Angle = 0.00
-
For each (Integer Temp_Int) from 1 to (Integer(Temp_Real)), do (Actions)
-
Loop - Actions
- Set TargetPoint = (Temp_Loc offset by 600.00 towards Temp_Angle degrees)
- Unit - Create 1 Lightning Lacrima for (Owner of TempUnit) at TargetPoint facing Default building facing degrees
- Unit - Add a 4.00 second Generic expiration timer to (Last created unit)
- Unit - Make (Last created unit) Explode on death
- Set Temp_Angle = (Temp_Angle + (360.00 / (Real((Integer(Temp_Real))))))
- Custom script: call RemoveLocation(udg_TargetPoint)
-
Loop - Actions
- Wait 4.00 seconds
- Unit - Unpause TempUnit
- Custom script: set bj_wantDestroyGroup=true
-
Unit Group - Pick every unit in (Units within 600.00 of Temp_Loc matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is Magic Immune) Equal to False) and (((Owner of (Matching unit)) is an ally of (Owner of TempUnit)) Equal to False)))) and do (Actions)
-
Loop - Actions
- Set TempUnit2 = (Picked unit)
- Custom script: call UnitDamageTarget(udg_TempUnit, udg_TempUnit2, udg_Damage, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL, null)
- Set TargetPoint = (Position of TempUnit2)
- Special Effect - Create a special effect at TargetPoint using Abilities\Spells\Other\Monsoon\MonsoonBoltTarget.mdl
- Special Effect - Destroy (Last created special effect)
- Custom script: call RemoveLocation(udg_TargetPoint)
-
Loop - Actions
-
Else - Actions
- Set Temp_Int = (Level of Thunder Palace for TempUnit)
- Unit - Remove Thunder Palace from TempUnit
- Unit - Add Thunder Palace to TempUnit
- Unit - Set level of Thunder Palace for TempUnit to Temp_Int
-
If - Conditions
- Custom script: call RemoveLocation(udg_Temp_Loc)
- Custom script: set udg_Damage=0
- Custom script: set udg_TempUnit=null
-
Events