Moderator
M
Moderator
|
14:41, 22nd Apr 2015
IcemanBo: https://www.hiveworkshop.com/threads/fireform-v1-1-a.264834/post-2677752
IcemanBo: https://www.hiveworkshop.com/threads/fireform-v1-1-a.264834/post-2677752
FF Config

Events


Map initialization

Conditions

Actions


-------- ------------------------------- --------


-------- CONFIGURATION --------


-------- ------------------------------- --------


-------- Store your ability into this variable --------


Set FF_Ability_ID = Fireform


-------- ------------------------------- --------


-------- Store your dummy ability into this variable --------


-------- FF_DAbility_ID[1] = Harvest (Gold and Lumber) --------


-------- FF_DAbility_ID[2] = Ignite --------


Set FF_DAbility_ID[1] = Harvest (Gold and Lumber)


Set FF_DAbility_ID[2] = Ignite


-------- ------------------------------- --------


-------- Store your dummy into this variable --------


Set FF_DummyCaster_ID = FireFormDummy


-------- ------------------------------- --------


-------- Store your desired special effect into this variable --------


Set FF_Spec = Abilities\Spells\Other\Doom\DoomDeath.mdl


-------- ------------------------------- --------


-------- The Attack Type of the spell. --------


Set FF_Attack_Type = Spells


-------- ------------------------------- --------


-------- The Damage Type of the spell. --------


Set FF_Damage_Type = Fire


-------- ------------------------------- --------


-------- The damage of your ability --------


Set FF_Damage[1] = 150.00


Set FF_Damage[2] = 225.00


Set FF_Damage[3] = 300.00


-------- ------------------------------- --------


-------- The speed of your ability --------


Set FF_Speed[1] = 1250.00


Set FF_Speed[2] = 1250.00


Set FF_Speed[3] = 1250.00


-------- ------------------------------- --------


-------- The AoE of your ability --------


Set FF_AoE[1] = 200.00


Set FF_AoE[2] = 200.00


Set FF_AoE[3] = 200.00


-------- ------------------------------- --------


-------- Do you want this ability to destroy trees? Yes = True, No = False --------


Set FF_DestroyTree = True


-------- ------------------------------- --------


-------- Do you want this ability to give enemy debuff? Yes = True, No = False --------


Set FF_Debuff = True


-------- ------------------------------- --------


-------- DO NOT CHANGE ANYTHING BELOW THIS POINT --------


-------- ------------------------------- --------


Set FF_TempPoint = (Center of (Playable map area))


Unit - Create 1 FF_DummyCaster_ID for Neutral Passive at FF_TempPoint facing Default building facing degrees


Set FF_DummyCaster = (Last created unit)


Unit - Make FF_DummyCaster Invulnerable


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




FF_DestroyTree Equal to True



Then - Actions




Unit - Add FF_DAbility_ID[1] to FF_DummyCaster



Else - Actions


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




FF_Debuff Equal to True



Then - Actions




Unit - Add FF_DAbility_ID[2] to FF_DummyCaster



Else - Actions


Custom script: call RemoveLocation(udg_FF_TempPoint)
FF Cast

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to FF_Ability_ID

Actions


Set FF_Max_Index = (FF_Max_Index + 1)


Set FF_Caster[FF_Max_Index] = (Triggering unit)


Set FF_TempPoint = (Position of FF_Caster[FF_Max_Index])


Set FF_TempPoint2 = (Target point of ability being cast)


Set FF_Angle[FF_Max_Index] = (Angle from FF_TempPoint to FF_TempPoint2)


Set FF_Level[FF_Max_Index] = (Level of FF_Ability_ID for FF_Caster[FF_Max_Index])


Set FF_Velo[FF_Max_Index] = (FF_Speed[FF_Level[FF_Max_Index]] x 0.03)


Set FF_Distance[FF_Max_Index] = (Distance between FF_TempPoint and FF_TempPoint2)


Set FF_ReachedDist[FF_Max_Index] = 0.00


Animation - Play FF_Caster[FF_Max_Index]'s attack animation


Animation - Change FF_Caster[FF_Max_Index]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 100.00% transparency


Custom script: if udg_FF_DamagedUnits[udg_FF_Max_Index] == null then


Custom script: set udg_FF_DamagedUnits[udg_FF_Max_Index] = CreateGroup()


Custom script: endif


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




FF_Max_Index Equal to 1



Then - Actions




Trigger - Turn on FF Loop <gen>



Else - Actions


Custom script: call RemoveLocation(udg_FF_TempPoint)


Custom script: call RemoveLocation(udg_FF_TempPoint2)
FF Loop

Events


Time - Every 0.03 seconds of game time

Conditions

Actions


For each (Integer FF_Current_Index) from 1 to FF_Max_Index, do (Actions)



Loop - Actions




Set FF_TempPoint = (Position of FF_Caster[FF_Current_Index])




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






Or - Any (Conditions) are true







Conditions








FF_ReachedDist[FF_Current_Index] Greater than or equal to FF_Distance[FF_Current_Index]








(FF_Caster[FF_Current_Index] is dead) Equal to True








(Terrain pathing at FF_TempPoint of type Walkability is off) Equal to True





Then - Actions






Animation - Change FF_Caster[FF_Current_Index]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency






Animation - Play FF_Caster[FF_Current_Index]'s attack animation






Custom script: call DestroyGroup(udg_FF_DamagedUnits[udg_FF_Current_Index])






Custom script: set udg_FF_DamagedUnits[udg_FF_Current_Index] = null






Set FF_Angle[FF_Current_Index] = FF_Angle[FF_Max_Index]






Set FF_Caster[FF_Current_Index] = FF_Caster[FF_Max_Index]






Set FF_Level[FF_Current_Index] = FF_Level[FF_Max_Index]






Set FF_Velo[FF_Current_Index] = FF_Velo[FF_Max_Index]






Set FF_ReachedDist[FF_Current_Index] = FF_ReachedDist[FF_Max_Index]






Set FF_Distance[FF_Current_Index] = FF_Distance[FF_Max_Index]






Set FF_Current_Index = (FF_Current_Index - 1)






Set FF_Max_Index = (FF_Max_Index - 1)






If (All Conditions are True) then do (Then Actions) else do (Else Actions)







If - Conditions








FF_Max_Index Equal to 0







Then - Actions








Trigger - Turn off (This trigger)







Else - Actions





Else - Actions






Set FF_TempPoint2 = (FF_TempPoint offset by FF_Velo[FF_Current_Index] towards FF_Angle[FF_Current_Index] degrees)






Custom script: call SetUnitX(udg_FF_Caster[udg_FF_Current_Index], GetLocationX(udg_FF_TempPoint2))






Custom script: call SetUnitY(udg_FF_Caster[udg_FF_Current_Index], GetLocationY(udg_FF_TempPoint2))






Special Effect - Create a special effect at FF_TempPoint using FF_Spec






Special Effect - Destroy (Last created special effect)






Set FF_ReachedDist[FF_Current_Index] = (FF_ReachedDist[FF_Current_Index] + FF_Velo[FF_Current_Index])






Custom script: set bj_wantDestroyGroup = true






Unit Group - Pick every unit in (Units within FF_AoE[FF_Level[FF_Current_Index]] of FF_TempPoint) and do (Actions)







Loop - Actions








Set FF_TempUnit = (Picked unit)








If (All Conditions are True) then do (Then Actions) else do (Else Actions)









If - Conditions










(FF_TempUnit is in FF_DamagedUnits[FF_Current_Index]) Equal to False










(FF_TempUnit is alive) Equal to True










(FF_TempUnit is A structure) Equal to False










(FF_TempUnit belongs to an enemy of (Owner of FF_Caster[FF_Current_Index])) Equal to True










(FF_TempUnit is Mechanical) Equal to False









Then - Actions










If (All Conditions are True) then do (Then Actions) else do (Else Actions)











If - Conditions












FF_Debuff Equal to True











Then - Actions












Unit - Order FF_DummyCaster to Neutral - Parasite FF_TempUnit











Else - Actions










Unit - Cause FF_Caster[FF_Current_Index] to damage FF_TempUnit, dealing FF_Damage[FF_Level[FF_Current_Index]] damage of attack type FF_Attack_Type and damage type FF_Damage_Type










Unit Group - Add FF_TempUnit to FF_DamagedUnits[FF_Current_Index]









Else - Actions






If (All Conditions are True) then do (Then Actions) else do (Else Actions)







If - Conditions








FF_DestroyTree Equal to True







Then - Actions








Destructible - Pick every destructible within FF_AoE[FF_Level[FF_Current_Index]] of FF_TempPoint and do (Actions)









Loop - Actions










Set FF_TempDest = (Picked destructible)










Unit - Order FF_DummyCaster to Harvest FF_TempDest










If (All Conditions are True) then do (Then Actions) else do (Else Actions)











If - Conditions












(Current order of FF_DummyCaster) Equal to (Order(harvest))











Then - Actions












Destructible - Kill FF_TempDest











Else - Actions










Unit - Order FF_DummyCaster to Stop







Else - Actions






Custom script: call RemoveLocation(udg_FF_TempPoint2)




Custom script: call RemoveLocation(udg_FF_TempPoint)