Hi!
Its been a long time since I posted here and I've secretly worked on a wc3 project for a while now. This is a spell from my little project. I created it after reading a tutorial on dynamic effects (which I read after reading the tutorial on static shapes).
What I want to know is if it is MUI?
I would also like some criticism etc on other parts of the spell!
Spell description:
This spell creates up to 3 "electric balls" circling around you, each one will start at a random position. When a unit is within the balls "aquisition range" it self-detonates and does a certain amount of damage, afterwards the unit is slowed for 5 seconds.
Screenshot 1 (Just the electric "balls" circling the hero):
Screenshot 2 (Enemy unit impact):
Trigger 1:
Trigger 2:
Only problem I have with it, as it is now is that when you move the balls kindoff "go into eachother", it would be nice if they kept a certain distance.
Its been a long time since I posted here and I've secretly worked on a wc3 project for a while now. This is a spell from my little project. I created it after reading a tutorial on dynamic effects (which I read after reading the tutorial on static shapes).
What I want to know is if it is MUI?
I would also like some criticism etc on other parts of the spell!
Spell description:
This spell creates up to 3 "electric balls" circling around you, each one will start at a random position. When a unit is within the balls "aquisition range" it self-detonates and does a certain amount of damage, afterwards the unit is slowed for 5 seconds.
Screenshot 1 (Just the electric "balls" circling the hero):
Screenshot 2 (Enemy unit impact):
Trigger 1:
Code:
Orbital
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to test three
Actions
-------- Checks if Orbital_CustomValue is less then 1000, if not it resets it to 1 --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Orbital_CustomValue Less than 1000
Then - Actions
Set Orbital_CustomValue = (Orbital_CustomValue + 1)
Else - Actions
Set Orbital_CustomValue = 1
-------- Setting variables --------
Set Orbital_DmgRange[Orbital_CustomValue] = 100.00
Set Orbital_RandomAngle[Orbital_CustomValue] = (Random real number between 0.00 and 360.00)
Set Orbital_MaxProjectiles[Orbital_CustomValue] = 3
Set Orbital_ProjectileRange[Orbital_CustomValue] = 200.00
Set Orbital_Caster[Orbital_CustomValue] = (Triggering unit)
Set Orbital_CurrentDuration[Orbital_CustomValue] = 0.00
Set Orbital_MaxDuration[Orbital_CustomValue] = 15.00
Set Orbital_temppt = (Position of Orbital_Caster[Orbital_CustomValue])
-------- Check how many projectiles currently are moving, if there is none it creates one for you, --------
-------- If there are as many as you are allowed too it removes the oldest one and creates a new one --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in Orbital_ProjectilesGroup) Less than Orbital_MaxProjectiles[Orbital_CustomValue]
Then - Actions
Unit - Create 1 Electric Ball for (Owner of Orbital_Caster[Orbital_CustomValue]) at (Orbital_temppt offset by Orbital_ProjectileRange[Orbital_CustomValue] towards Orbital_RandomAngle[Orbital_CustomValue] degrees) facing Default building facing degrees
Unit - Set the custom value of (Last created unit) to Orbital_CustomValue
Unit Group - Add (Last created unit) to Orbital_ProjectilesGroup
Set Orbital_ProjectileUnit[Orbital_CustomValue] = (Last created unit)
Unit - Turn collision for Orbital_ProjectileUnit[Orbital_CustomValue] Off
Unit - Pause Orbital_ProjectileUnit[Orbital_CustomValue]
Else - Actions
Unit - Remove Orbital_ProjectileUnit[(Orbital_CustomValue - Orbital_MaxProjectiles[Orbital_CustomValue])] from the game
Unit - Create 1 Electric Ball for (Owner of Orbital_Caster[Orbital_CustomValue]) at (Orbital_temppt offset by Orbital_ProjectileRange[Orbital_CustomValue] towards Orbital_RandomAngle[Orbital_CustomValue] degrees) facing Default building facing degrees
Unit - Set the custom value of (Last created unit) to Orbital_CustomValue
Unit Group - Add (Last created unit) to Orbital_ProjectilesGroup
Set Orbital_ProjectileUnit[Orbital_CustomValue] = (Last created unit)
Unit - Turn collision for Orbital_ProjectileUnit[Orbital_CustomValue] Off
Unit - Pause Orbital_ProjectileUnit[Orbital_CustomValue]
Special Effect - Destroy (Last created special effect)
Custom script: call RemoveLocation (udg_Orbital_temppt)
Trigger 2:
Code:
Orbital Effect
Events
Time - Every 0.04 seconds of game time
Conditions
(Number of units in Orbital_ProjectilesGroup) Greater than 0
Actions
Unit Group - Pick every unit in Orbital_ProjectilesGroup and do (Actions)
Loop - Actions
Set Orbital_tempinteger = (Custom value of (Picked unit))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Orbital_CurrentDuration[Orbital_tempinteger] Greater than or equal to Orbital_MaxDuration[Orbital_tempinteger]
Then - Actions
Unit - Remove (Picked unit) from the game
Else - Actions
-------- Check if any enemy unit that is alive is in range and self-detonates if so --------
Unit Group - Pick every unit in (Units within Orbital_DmgRange[Orbital_tempinteger] of (Position of Orbital_ProjectileUnit[Orbital_tempinteger]) matching ((((Matching unit) belongs to an enemy of (Owner of Orbital_Caster[Orbital_tempinteger])) Equal to True) and (((Matching unit) is alive) and do (Actions)
Loop - Actions
-------- Creates a dummy unit and adds electronic ball explode! to it, then uses it. after the explosion it removes the electric ball and dummy --------
Unit - Create 1 dummy for (Owner of Orbital_Caster[Orbital_tempinteger]) at (Position of Orbital_ProjectileUnit[Orbital_tempinteger]) facing Default building facing degrees
Set Orbital_DummyCaster[Orbital_tempinteger] = (Last created unit)
Unit - Add Electric Ball Explode! to Orbital_DummyCaster[Orbital_tempinteger]
Unit - Order Orbital_DummyCaster[Orbital_tempinteger] to Human Mountain King - Thunder Clap
Special Effect - Create a special effect at (Position of Orbital_ProjectileUnit[Orbital_tempinteger]) using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
Unit - Remove Orbital_ProjectileUnit[Orbital_tempinteger] from the game
Unit - Remove Orbital_DummyCaster[Orbital_tempinteger] from the game
-------- Moves the orbital unit --------
Unit - Move Orbital_ProjectileUnit[Orbital_tempinteger] instantly to ((Position of Orbital_Caster[Orbital_tempinteger]) offset by Orbital_ProjectileRange[Orbital_tempinteger] towards ((Angle from (Position of Orbital_Caster[Orbital_tempinteger]) to (Position of Orbital_ProjectileUnit[Orbital_tempinteger])) + 5.00) degrees)
-------- Sets current duration +0.04 --------
Set Orbital_CurrentDuration[Orbital_tempinteger] = (Orbital_CurrentDuration[Orbital_tempinteger] + 0.04)
Special Effect - Destroy (Last created special effect)
Only problem I have with it, as it is now is that when you move the balls kindoff "go into eachother", it would be nice if they kept a certain distance.