Hi guys, I'm working on this spell and trying to make it MUI but I have no idea how to use hashtables, please can you help me? Also any suggestion to make my triggers better would be helpful. (I'm not an expert using vJass ect. even WE triggers, just know the basics)
OK! The Spell is basically summoning a Faerie Dragon companium which is invunerable and unselectable (Locust abillity). It follows and moves randomly around the caster, it can cast abillitys at certain cooldowns at the enemy the caster is attacking. This spell is inspired in Emerald's Summon Gawain from HON.
Here is the codes
OK! The Spell is basically summoning a Faerie Dragon companium which is invunerable and unselectable (Locust abillity). It follows and moves randomly around the caster, it can cast abillitys at certain cooldowns at the enemy the caster is attacking. This spell is inspired in Emerald's Summon Gawain from HON.
Here is the codes
-
Faerie ini
-
Events
-
Map initialization
-
-
Conditions
-
Actions
-
-------- 0.05 x Value = Fairy Fire Abillity Cooldown --------
-
Set FireBoltCooldown = 200
-
-------- -------- --------
-
-------- 0.05 x Value = Time between move order (less than 10 it may bug/wierd animation) -----
-
Set MoveFrequency = 10
-
-------- -------- --------
-
-------- Area to fairy move around the caster --------
-
Set MoveArea = 600.00
-
-------- -------- --------
-
-------- Range limit between caster and fairy, to cast Fire Fairy --------
-
Set DistanceFairyFire = (MoveArea + 600.00)
-
-------- -------- --------
-
-------- Distance limit to blink --------
-
Set DistanceBlink = (MoveArea + 1000.00)
-
-------- -------- --------
-
-------- Range check to decides if it moves at a random point or follow --------
-
Set FollowRange = 350.00
-
-------- -------- --------
-
-------- Effects --------
-
-------- Blink Effect --------
-
Set BlinkEffect = Abilities\Spells\NightElf\Blink\BlinkCaster.mdl
-
-------- -------- --------
-
-------- Summon Effect --------
-
Set SummonEffect = Abilities\Spells\NightElf\FaerieDragonInvis\FaerieDragon_Invis.mdl
-
-------- -------- --------
-
-------- Permanent Effect --------
-
Set AttachedEffect = war3mapImported\Phoenix_Missile.mdl
-
-
-
Faerie Summon
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Fire Fairy Dragon (Unit/Caster)
-
-
Actions
-
Unit - Kill F_Fairy
-
Trigger - Turn off Faerie Loop <gen>
-
Set F_AbillityCount = (F_AbillityCount - 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
F_AbillityCount Less than or equal to 0
-
-
Then - Actions
-
Set F_AbillityCount = (F_AbillityCount + 1)
-
Set F_Caster = (Casting unit)
-
Set F_CasterPoint = (Position of F_Caster)
-
Unit - Create 1 Fire Fairy Dragon for (Owner of F_Caster) at (Position of F_Caster) facing (Position of F_Caster)
-
Set F_Fairy = (Last created unit)
-
Unit - Change color of F_Fairy to Blue
-
Special Effect - Create a special effect attached to the chest of F_Fairy using AttachedEffect
-
Special Effect - Create a special effect attached to the chest of F_Fairy using SummonEffect
-
Special Effect - Destroy (Last created special effect)
-
Set F_FairyFireCD = FireBoltCooldown
-
Trigger - Turn on Faerie Loop <gen>
-
-
Else - Actions
-
-
Custom script: call RemoveLocation(udg_F_CasterPoint)
-
Custom script: call RemoveLocation(udg_F_FairyPoint)
-
-
-
Faerie Loop
-
Events
-
Time - Every 0.05 seconds of game time
-
-
Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(F_Caster is alive) Equal to True
-
-
Then - Actions
-
Set F_FairyFireCD = (F_FairyFireCD + 1)
-
Set F_BlinkCD = (F_BlinkCD + 1)
-
Set F_TickMove = (F_TickMove + 1)
-
Set F_FairyPoint = (Position of F_Fairy)
-
Set F_CasterPoint = (Position of F_Caster)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Distance between F_FairyPoint and F_CasterPoint) Greater than or equal to DistanceBlink
-
F_BlinkCD Greater than or equal to 5
-
-
Then - Actions
-
Unit - Move F_Fairy instantly to F_CasterPoint, facing F_FairyPoint
-
Special Effect - Create a special effect attached to the chest of F_Fairy using BlinkEffect
-
Special Effect - Destroy (Last created special effect)
-
Set F_TickMove = 0
-
Set F_BlinkCD = 0
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
F_TickMove Greater than or equal to MoveFrequency
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Distance between F_FairyPoint and F_CasterPoint) Greater than or equal to FollowRange
-
-
Then - Actions
-
Unit - Order F_Fairy to Right-Click F_Caster
-
Set F_TickMove = 0
-
-
Else - Actions
-
Unit - Order F_Fairy to Move To (Random point in (Region centered at F_CasterPoint with size (MoveArea, MoveArea)))
-
Set F_TickMove = 0
-
-
-
-
Else - Actions
-
-
-
-
-
Else - Actions
-
Unit - Kill F_Fairy
-
Trigger - Turn off (This trigger)
-
-
-
Custom script: call RemoveLocation(udg_F_CasterPoint)
-
Custom script: call RemoveLocation(udg_F_FairyPoint)
-
-
-
Faerie Bolt
-
Events
-
Unit - A unit Is attacked
-
-
Conditions
-
(Attacking unit) Equal to F_Caster
-
-
Actions
-
Set F_FairyPoint = (Position of F_Fairy)
-
Set F_CasterPoint = (Position of F_Caster)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
F_FairyFireCD Greater than or equal to FireBoltCooldown
-
(Distance between F_FairyPoint and F_CasterPoint) Less than or equal to DistanceFairyFire
-
-
Then - Actions
-
Trigger - Turn off Faerie Loop <gen>
-
Set F_TickMove = 0
-
Set F_FairyFireCD = 0
-
Set F_AttackTarget = (Attacked unit)
-
Unit - Order F_Fairy to Neutral Alchemist - Acid Bomb F_AttackTarget
-
Trigger - Turn on Faerie Loop <gen>
-
-
Else - Actions
-
-
Custom script: call RemoveLocation(udg_F_CasterPoint)
-
Custom script: call RemoveLocation(udg_F_FairyPoint)
-
-
Last edited: