Moderator
M
Moderator
Maker, 3rd Aug 2011, Star v1.4
Approved. Everything looks ok. The triggering is good.
I suggest you move on to JASS since you're using that many custom scripts.
StarStar
Ingame Description
The caster summons a star. The star rises up and crashes down, causing heavy area damage, damage per second, and having a chance to electrocute enemies affected by the star.
Deals a base area damage, damage over time, and a chance to cast chain lightning.
- AbsoluteINT
- Events
- Map initialization
- Conditions
- Actions
- Custom script: set udg_HashAbsol = InitHashtable()
- Set ALT = Drain Life
- Set AbsolDamg = 25.00
- Set Absolaoe = 50.00
- Set AbsolMaxBound = 6
- Custom script: set udg_AbsolId = 'h000'
- Custom script: set udg_AbsolLightningId = 'A001'
- Custom script: call Preload("Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl")
- AbsoluteCAST
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- (Ability being cast) Equal to Star
- Actions
- Set AbsolCast = (Triggering unit)
- Set AP = (Position of AbsolCast)
- Set AbsolPlayer = (Triggering player)
- Custom script: set udg_AbsolDummy = CreateUnitAtLoc(udg_AbsolPlayer, udg_AbsolId, udg_AP, 270)
- Custom script: set udg_Handle_Absol = GetHandleId(udg_AbsolDummy)
- Custom script: call ShowUnit(udg_AbsolDummy, false)
- -------- ======================================== --------
- -------- Lightning Create --------
- Set AbsolINTEGER = 0
- Set AbsolUnitInteger = 41
- For each (Integer AbsolLoop) from 1 to 6, do (Actions)
- Loop - Actions
- Set AbsolINTEGER = (AbsolINTEGER + 1)
- Set AbsolUnitInteger = (AbsolUnitInteger + 1)
- Set AbsolREAL = (60.00 x (Real(AbsolLoop)))
- -------- ==================================== --------
- Set AP2 = (AP offset by 180.00 towards AbsolREAL degrees)
- -------- Lower bolt --------
- Custom script: set udg_AL = AddLightningEx(udg_ALT, true , GetLocationX(udg_AP), GetLocationY(udg_AP), GetLocationZ(udg_AP) + (udg_AH1), GetLocationX(udg_AP2), GetLocationY(udg_AP2), GetLocationZ(udg_AP2) + (udg_AH2) )
- -------- Color --------
- Custom script: call SetLightningColor(udg_AL, 1, 1, 0, 1)
- Custom script: call SaveLightningHandle(udg_HashAbsol, udg_Handle_Absol, udg_AbsolINTEGER, udg_AL)
- -------- ==================================== --------
- Custom script: set udg_AbsolDummy2 = CreateUnitAtLoc(udg_AbsolPlayer, udg_AbsolId, udg_AP2, 0)
- Custom script: call SaveUnitHandle(udg_HashAbsol, udg_Handle_Absol, udg_AbsolUnitInteger, udg_AbsolDummy2)
- Custom script: call SetUnitExploded(udg_AbsolDummy2, true)
- Custom script: call SetUnitFlyHeight(udg_AbsolDummy2, 50, 0)
- Custom script: call UnitApplyTimedLife(udg_AbsolDummy2, 'BTFL', 6.68)
- -------- ==================================== --------
- Set AbsolINTEGER = (AbsolINTEGER + 1)
- -------- ==================================== --------
- Set AP3 = (AP2 offset by 160.00 towards (AbsolREAL + 180.00) degrees)
- -------- Upper bolt --------
- Custom script: set udg_AL = AddLightningEx(udg_ALT, true , GetLocationX(udg_AP2), GetLocationY(udg_AP2), GetLocationZ(udg_AP2) + (udg_AH2), GetLocationX(udg_AP3), GetLocationY(udg_AP3), GetLocationZ(udg_AP3) + (udg_AH3) )
- -------- Color --------
- Custom script: call SetLightningColor(udg_AL, 0, 1, 1, 1)
- Custom script: call SaveLightningHandle(udg_HashAbsol, udg_Handle_Absol, udg_AbsolINTEGER, udg_AL)
- -------- ==================================== --------
- -------- ==================================== --------
- -------- ==================================== --------
- Custom script: call RemoveLocation(udg_AP2)
- Custom script: call RemoveLocation(udg_AP3)
- Set AbsolINTEGER = (Level of Star for AbsolCast)
- -------- ======================================== --------
- -------- ======================================== --------
- -------- ======================================== --------
- -------- Algorithm booleans --------
- Custom script: call SaveBoolean(udg_HashAbsol, udg_Handle_Absol, 13, false)
- Custom script: call SaveBoolean(udg_HashAbsol, udg_Handle_Absol, 14, false)
- Custom script: call SaveBoolean(udg_HashAbsol, udg_Handle_Absol, 22, false)
- Custom script: call SaveBoolean(udg_HashAbsol, udg_Handle_Absol, 37, false)
- -------- Damage --------
- Custom script: call SaveReal(udg_HashAbsol, udg_Handle_Absol, 15, 50+udg_AbsolDamg * udg_AbsolINTEGER)
- -------- Area of Effect --------
- Custom script: call SaveReal(udg_HashAbsol, udg_Handle_Absol, 16, 70+udg_Absolaoe * udg_AbsolINTEGER)
- -------- Effect Numerals --------
- Custom script: call SaveReal(udg_HashAbsol, udg_Handle_Absol, 17, 5.75)
- Custom script: call SaveReal(udg_HashAbsol, udg_Handle_Absol, 18, 80)
- Custom script: call SaveReal(udg_HashAbsol, udg_Handle_Absol, 19, 50)
- Custom script: call SaveReal(udg_HashAbsol, udg_Handle_Absol, 20, 80)
- -------- Caster --------
- Custom script: call SaveUnitHandle(udg_HashAbsol, udg_Handle_Absol, 21, udg_AbsolCast)
- Custom script: call SaveReal(udg_HashAbsol, udg_Handle_Absol, 21, 0)
- Custom script: call SaveReal(udg_HashAbsol, udg_Handle_Absol, 40, 1)
- -------- ======================================== --------
- Custom script: call GroupAddUnit(udg_AbsolGroup, udg_AbsolDummy)
- -------- ======================================== --------
- -------- ======================================== --------
- Set AbsolTrigger = (AbsolTrigger + 1)
- Trigger - Turn on AbsoluteLOOP <gen>
- Custom script: call RemoveLocation(udg_AP)
- AbsoluteLOOP
- Events
- Time - Every 0.03 seconds of game time
- Conditions
- Actions
- Unit Group - Pick every unit in AbsolGroup and do (Actions)
- Loop - Actions
- Set AbsolDestroy = False
- Set AbsolCast = (Picked unit)
- Custom script: set udg_Handle_Absol = GetHandleId(udg_AbsolCast)
- Set AP = (Position of AbsolCast)
- -------- ======================================= --------
- -------- ======================================= --------
- -------- ======================================= --------
- -------- Load booleans --------
- Custom script: set udg_AbsolBoolean1 = LoadBoolean(udg_HashAbsol, udg_Handle_Absol, 13)
- Custom script: set udg_AbsolBoolean2 = LoadBoolean(udg_HashAbsol, udg_Handle_Absol, 14)
- Custom script: set udg_AbsolBoolean3 = LoadBoolean(udg_HashAbsol, udg_Handle_Absol, 22)
- Custom script: set udg_AbsolBoolean4 = LoadBoolean(udg_HashAbsol, udg_Handle_Absol, 37)
- Custom script: set udg_AbsolRealHeightUp = LoadReal(udg_HashAbsol, udg_Handle_Absol, 17)
- -------- ======================================= --------
- -------- ======================================= --------
- -------- ======================================= --------
- -------- ======================================= --------
- -------- Load values --------
- Custom script: set udg_AH1 = LoadReal(udg_HashAbsol, udg_Handle_Absol, 18)
- Custom script: set udg_AH2 = LoadReal(udg_HashAbsol, udg_Handle_Absol, 19)
- Custom script: set udg_AH3 = LoadReal(udg_HashAbsol, udg_Handle_Absol, 20)
- -------- ======================================= --------
- -------- ======================================= --------
- -------- Increase values --------
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- AbsolBoolean1 Equal to True
- Then - Actions
- Set AH1 = (AH1 + AbsolRealHeightUp)
- Set AH2 = (AH2 + AbsolRealHeightUp)
- Set AH3 = (AH3 + AbsolRealHeightUp)
- Custom script: set udg_AbsolREAL = 6.75 + LoadReal(udg_HashAbsol, udg_Handle_Absol, 21)
- -------- ======================================= --------
- -------- ======================================= --------
- -------- ======================================= --------
- Custom script: call SaveReal(udg_HashAbsol, udg_Handle_Absol, 19, udg_AH2)
- Custom script: call SaveReal(udg_HashAbsol, udg_Handle_Absol, 18, udg_AH1)
- Custom script: call SaveReal(udg_HashAbsol, udg_Handle_Absol, 21, udg_AbsolREAL)
- Else - Actions
- Custom script: set udg_AbsolREAL = LoadReal(udg_HashAbsol, udg_Handle_Absol, 21)
- Set AH3 = (AH3 + AbsolRealHeightUp)
- -------- ======================================= --------
- -------- Color decrease --------
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- AbsolBoolean4 Equal to True
- Then - Actions
- Custom script: set udg_AbsolCol = LoadReal(udg_HashAbsol, udg_Handle_Absol, 40)
- Custom script: call SaveReal(udg_HashAbsol, udg_Handle_Absol, 40, udg_AbsolCol - .04)
- Else - Actions
- -------- ======================================= --------
- -------- Change lightning formation --------
- Set AbsolUnitInteger = 41
- For each (Integer AbsolLoop) from 1 to 12, do (Actions)
- Loop - Actions
- Custom script: set udg_AL = LoadLightningHandle(udg_HashAbsol, udg_Handle_Absol, udg_AbsolLoop)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (AbsolLoop - ((AbsolLoop / 2) x 2)) Equal to 1
- Then - Actions
- Set AbsolREAL = (AbsolREAL + 60.00)
- Else - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- AbsolBoolean4 Equal to True
- Then - Actions
- Custom script: call SetLightningColor(udg_AL, 1, 0, 1, udg_AbsolCol)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- AbsolCol Less than or equal to 0.10
- Then - Actions
- Custom script: call DestroyLightning(udg_AL)
- Set AbsolDestroy = True
- Else - Actions
- Else - Actions
- Set AP2 = (AP offset by 180.00 towards AbsolREAL degrees)
- Set AP3 = (AP2 offset by 160.00 towards (AbsolREAL + 180.00) degrees)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- AbsolBoolean2 Equal to False
- Then - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (AbsolLoop - ((AbsolLoop / 2) x 2)) Equal to 0
- Then - Actions
- Set AbsolUnitInteger = (AbsolUnitInteger + 1)
- Custom script: set udg_AbsolDummy2 = LoadUnitHandle(udg_HashAbsol, udg_Handle_Absol, udg_AbsolUnitInteger)
- Unit - Move AbsolDummy2 instantly to AP2
- Custom script: call SetUnitFlyHeight(udg_AbsolDummy2, udg_AH2, 0)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- AbsolDestroy Equal to True
- Then - Actions
- Unit - Explode AbsolDummy2
- Else - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- AbsolBoolean4 Equal to True
- Then - Actions
- Custom script: call MoveLightningEx(udg_AL , true , GetLocationX(udg_AP), GetLocationY(udg_AP), GetLocationZ(udg_AP) + (udg_AH1) , GetLocationX(udg_AP2), GetLocationY(udg_AP2), GetLocationZ(udg_AP2) + (udg_AH2))
- Else - Actions
- Custom script: call MoveLightningEx(udg_AL , true , GetLocationX(udg_AP2), GetLocationY(udg_AP2), GetLocationZ(udg_AP2) + (udg_AH1) , GetLocationX(udg_AP3), GetLocationY(udg_AP3), GetLocationZ(udg_AP3) + (udg_AH2))
- Else - Actions
- Custom script: call MoveLightningEx(udg_AL , true , GetLocationX(udg_AP2), GetLocationY(udg_AP2), GetLocationZ(udg_AP2) + (udg_AH2) , GetLocationX(udg_AP3), GetLocationY(udg_AP3), GetLocationZ(udg_AP3) + (udg_AH3))
- Else - Actions
- Custom script: call RemoveLocation(udg_AP2)
- Custom script: call RemoveLocation(udg_AP3)
- -------- ======================================= --------
- -------- ======================================= --------
- -------- ======================================= --------
- -------- Raise up/Fall down --------
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- AbsolBoolean1 Equal to False
- AH3 Greater than or equal to 275.00
- AH1 Less than or equal to 90.00
- Then - Actions
- Custom script: call SaveBoolean(udg_HashAbsol, udg_Handle_Absol, 13, true)
- Custom script: call SaveReal(udg_HashAbsol, udg_Handle_Absol, 17, udg_AbsolRealHeightUp * 1.75)
- Else - Actions
- -------- ======================================= --------
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- AbsolBoolean1 Equal to True
- AbsolBoolean2 Equal to False
- AH2 Greater than or equal to 1000.00
- Then - Actions
- Custom script: call SaveBoolean(udg_HashAbsol, udg_Handle_Absol, 13, false)
- Custom script: call SaveBoolean(udg_HashAbsol, udg_Handle_Absol, 22, true)
- Custom script: call SaveReal(udg_HashAbsol, udg_Handle_Absol, 17, udg_AbsolRealHeightUp * -.75)
- Else - Actions
- -------- M^ --------
- -------- ======================================= --------
- -------- ======================================= --------
- -------- Spin/Boolean Modifier/DoT --------
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- AbsolBoolean1 Equal to False
- AbsolBoolean2 Equal to False
- AbsolBoolean3 Equal to True
- AH3 Less than or equal to 750.00
- Then - Actions
- Custom script: call SaveBoolean(udg_HashAbsol, udg_Handle_Absol, 13, true)
- Custom script: call SaveReal(udg_HashAbsol, udg_Handle_Absol, 17, udg_AbsolRealHeightUp * 5.98)
- Else - Actions
- -------- ======================================= --------
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- AbsolBoolean1 Equal to True
- AbsolBoolean2 Equal to False
- AbsolBoolean3 Equal to True
- AH3 Less than or equal to -30.00
- Then - Actions
- Custom script: call SaveBoolean(udg_HashAbsol, udg_Handle_Absol, 14, true)
- Custom script: call SaveReal(udg_HashAbsol, udg_Handle_Absol, 17, 0)
- Else - Actions
- -------- ======================================= --------
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- AbsolBoolean4 Equal to False
- AbsolBoolean3 Equal to True
- AbsolBoolean2 Equal to True
- AbsolBoolean1 Equal to True
- Then - Actions
- Custom script: set udg_AH1 = LoadReal(udg_HashAbsol, udg_Handle_Absol, 15)
- Custom script: set udg_AbsolREAL = LoadReal(udg_HashAbsol, udg_Handle_Absol, 16)
- Custom script: set udg_AbsolDummy = LoadUnitHandle(udg_HashAbsol, udg_Handle_Absol, 21)
- Custom script: call SaveBoolean(udg_HashAbsol, udg_Handle_Absol, 37, true)
- Custom script: set bj_wantDestroyGroup = true
- Unit Group - Pick every unit in (Units within AbsolREAL of AP matching (((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((((Matching unit) is Magic Immune) Equal to False) and ((((Matching unit) belongs to an ally of (Owner of AbsolCas and do (Actions)
- Loop - Actions
- Set AbsolDummy2 = (Picked unit)
- Custom script: call UnitDamageTarget (udg_AbsolDummy, udg_AbsolDummy2, udg_AH1, true, true, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL, null)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (AbsolDummy2 is alive) Equal to True
- Then - Actions
- Custom script: set udg_Handle_Absol = GetHandleId(udg_AbsolDummy2)
- Set AbsolTrigger = (AbsolTrigger + 1)
- Custom script: call SaveUnitHandle(udg_HashAbsol, udg_Handle_Absol, 32, udg_AbsolDummy)
- -------- ============================================= --------
- -------- ============================================= --------
- -------- =====================Damage over Time Damage======================== --------
- Custom script: call SaveReal(udg_HashAbsol, udg_Handle_Absol, 31, udg_AH1 / 3)
- Custom script: call SaveInteger(udg_HashAbsol, udg_Handle_Absol, 33, 0)
- -------- =======================Damage over Time duration====================== --------
- Custom script: call SaveInteger(udg_HashAbsol, udg_Handle_Absol, 34, 4)
- Custom script: call GroupAddUnit (udg_AbsolGroupTARGET, udg_AbsolDummy2)
- -------- ============================================= --------
- -------- ============================================= --------
- -------- ===================Lightning Chance========================== --------
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Random integer number between 1 and 3) Equal to 2
- Then - Actions
- Custom script: set udg_AbsolCast = CreateUnitAtLoc(GetOwningPlayer(udg_AbsolCast), udg_AbsolId, udg_AP, 270)
- Custom script: call SetUnitAbilityLevel(udg_AbsolCast, udg_AbsolLightningId, GetRandomInt(1,udg_AbsolMaxBound) )
- Custom script: call IssueTargetOrder( udg_AbsolCast, "chainlightning",udg_AbsolDummy2 )
- Custom script: call UnitApplyTimedLife( udg_AbsolCast, 'BTLF', 1 )
- Custom script: call SetUnitExploded( udg_AbsolCast, true )
- Else - Actions
- Else - Actions
- Else - Actions
- -------- M^ --------
- -------- ======================================= --------
- -------- ======================================= --------
- -------- Destroy --------
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- AbsolDestroy Equal to True
- Then - Actions
- Custom script: call GroupRemoveUnit(udg_AbsolGroup, udg_AbsolCast)
- Custom script: call UnitApplyTimedLife( udg_AbsolCast, 'BTLF', .01 )
- Custom script: call SetUnitExploded( udg_AbsolCast, true )
- Custom script: call FlushChildHashtable( udg_HashAbsol, udg_Handle_Absol )
- Set AbsolTrigger = (AbsolTrigger - 1)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- AbsolTrigger Equal to 0
- Then - Actions
- Trigger - Turn off (This trigger)
- Else - Actions
- Else - Actions
- Custom script: call SaveReal(udg_HashAbsol, udg_Handle_Absol, 20, udg_AH3)
- Custom script: call RemoveLocation(udg_AP)
- -------- Damage over Time --------
- Set AbsolCnt = (AbsolCnt + 1)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- AbsolCnt Greater than or equal to AbsolMax
- Then - Actions
- Set AbsolCnt = 0
- Set AbsolMax = (Random integer number between 28 and 41)
- Unit Group - Pick every unit in AbsolGroupTARGET and do (Actions)
- Loop - Actions
- Set AbsolCast = (Picked unit)
- Custom script: set udg_Handle_Absol = GetHandleId(udg_AbsolCast)
- Custom script: set udg_AbsolINTEGER = LoadInteger(udg_HashAbsol, udg_Handle_Absol, 33)
- Custom script: set udg_AbsolLoop = LoadInteger(udg_HashAbsol, udg_Handle_Absol, 34)
- Custom script: set udg_AH3 = LoadReal(udg_HashAbsol, udg_Handle_Absol, 31)
- Custom script: set udg_AbsolDummy = LoadUnitHandle(udg_HashAbsol, udg_Handle_Absol, 32)
- Custom script: call SaveInteger(udg_HashAbsol, udg_Handle_Absol, 33, udg_AbsolINTEGER + 1)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (AbsolCast is alive) Equal to True
- AbsolINTEGER Less than or equal to AbsolLoop
- Then - Actions
- Custom script: call UnitDamageTarget (udg_AbsolDummy, udg_AbsolCast, udg_AH3, true, true, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL, null)
- Custom script: call DestroyEffect(AddSpecialEffect( "Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl", GetUnitX(udg_AbsolCast), GetUnitY(udg_AbsolCast) ))
- Else - Actions
- Custom script: call GroupRemoveUnit(udg_AbsolGroupTARGET, udg_AbsolCast)
- Custom script: call FlushChildHashtable( udg_HashAbsol, udg_Handle_Absol )
- Set AbsolTrigger = (AbsolTrigger - 1)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- AbsolTrigger Equal to 0
- Then - Actions
- Trigger - Turn off (This trigger)
- Else - Actions
- Else - Actions
Update Log