Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
You are using an out of date browser. It may not display this or other websites correctly. You should upgrade or use an alternative browser.
Triggers
Split Fireball.w3x
Variables
Initialization
Melee Initialization
Spawn
Text
Split Fireball
Hashtable
Split Fireball Cast
Split Fireball Move
Fireball Death
Credits
Enter map-specific custom script code below. This text will be included in the map script after variables are declared and before any trigger code.
Name
Type
is_array
initial_value
ExplodeRange
real
No
Fireballs
group
No
FireMovePoint
location
No
FirePoint
location
No
Firetable
hashtable
No
SpawnRange
real
No
Default melee game initialization for all players
Melee Initialization
Events
Map initialization
Conditions
Actions
Melee Game - Use melee time of day (for all players)
Visibility - Disable fog of war
Visibility - Disable black mask
Spawn
Events
Player - Player 1 (Red) skips a cinematic sequence
Conditions
Actions
Unit - Create 1 . Peasant for Player 2 (Blue) at (Random point in Spawn <gen>) facing Default building facing degrees
Text
Events
Time - Elapsed game time is 0.01 seconds
Conditions
Actions
Game - Display to (All players) for 1337.00 seconds the text: Welcome! Use the Split Fireball spell as much as you want!Press ESC to spawn another Peasant!
Hashtable
Events
Time - Elapsed game time is 0.01 seconds
Conditions
Actions
Hashtable - Create a hashtable
Set Variable Set Firetable = (Last created hashtable)
Set Variable Set ExplodeRange = "50.00"
Set Variable Set SpawnRange = "53.00"
Split Fireball Cast
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Split Fireball
Actions
Trigger - Turn on Split_Fireball_Move <gen>
Set Variable Set FirePoint = (Position of (Triggering unit))
Set Variable Set FireMovePoint = (Target point of ability being cast)
Unit - Create 1 . Fireball for (Owner of (Triggering unit)) at FirePoint facing (Angle from FirePoint to FireMovePoint) degrees
Unit - Set level of Fireball Death for (Last created unit) to (Level of Split Fireball for (Triggering unit))
Hashtable - Save (Level of Split Fireball for (Triggering unit)) as (Key FireHits.) of (Key (Last created unit).) in Firetable .
Hashtable - Save ((Real((Level of Split Fireball for (Triggering unit)))) x 5.00) as (Key FireSpeed.) of (Key (Last created unit).) in Firetable .
Unit - Add a ((Real((Level of Split Fireball for (Triggering unit)))) x 2.00) second Generic expiration timer to (Last created unit)
Hashtable - Save (Angle from FirePoint to FireMovePoint) as (Key FireFacing.) of (Key (Last created unit).) in Firetable .
Unit Group - Pick every unit in Fireballs and do (Actions)
Loop - Actions
Set Variable Set FirePoint = (Position of (Picked unit))
Set Variable Set FireMovePoint = (FirePoint offset by (Load (Key FireSpeed.) of (Key (Picked unit).) from Firetable.) towards (Load (Key FireFacing.) of (Key (Picked unit).) from Firetable.) degrees.)
Unit - Move (Picked unit) instantly to FireMovePoint
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Terrain pathing at FireMovePoint of type Walkability is off) Equal to True
Then - Actions
Unit - Kill (Picked unit)
Hashtable - Clear all child hashtables of child (Key (Picked unit).) in Firetable .
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in (Units within ExplodeRange of FireMovePoint matching (((Owner of (Matching unit)) Not equal to (Owner of (Picked unit))) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) is A structure) Equal to False))).)) Greater than 0
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Load (Key FireHits.) of (Key (Picked unit).) from Firetable.) Greater than 0
Then - Actions
Unit - Create 1 . Fireball for (Owner of (Picked unit)) at (FireMovePoint offset by SpawnRange towards ((Load (Key FireFacing.) of (Key (Picked unit).) from Firetable.) + 90.00) degrees.) facing ((Load (Key FireFacing.) of (Key (Picked unit).) from Firetable.) + 90.00) degrees
Hashtable - Save ((Load (Key FireFacing.) of (Key (Picked unit).) from Firetable.) + 90.00) as (Key FireFacing.) of (Key (Last created unit).) in Firetable .
Hashtable - Save (Load (Key FireSpeed.) of (Key (Picked unit).) from Firetable.) as (Key FireSpeed.) of (Key (Last created unit).) in Firetable .
Hashtable - Save ((Load (Key FireHits.) of (Key (Picked unit).) from Firetable.) - 1) as (Key FireHits.) of (Key (Last created unit).) in Firetable .
Unit - Set level of Fireball Death for (Last created unit) to (Level of Fireball Death for (Picked unit))
Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
Unit Group - Add (Last created unit) to Fireballs
Unit - Create 1 . Fireball for (Owner of (Picked unit)) at (FireMovePoint offset by SpawnRange towards ((Load (Key FireFacing.) of (Key (Picked unit).) from Firetable.) - 90.00) degrees.) facing ((Load (Key FireFacing.) of (Key (Picked unit).) from Firetable.) - 90.00) degrees
Hashtable - Save ((Load (Key FireFacing.) of (Key (Picked unit).) from Firetable.) - 90.00) as (Key FireFacing.) of (Key (Last created unit).) in Firetable .
Hashtable - Save (Load (Key FireSpeed.) of (Key (Picked unit).) from Firetable.) as (Key FireSpeed.) of (Key (Last created unit).) in Firetable .
Hashtable - Save ((Load (Key FireHits.) of (Key (Picked unit).) from Firetable.) - 1) as (Key FireHits.) of (Key (Last created unit).) in Firetable .
Unit - Set level of Fireball Death for (Last created unit) to (Level of Fireball Death for (Picked unit))
Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
Unit Group - Add (Last created unit) to Fireballs
Hashtable - Clear all child hashtables of child (Key (Picked unit).) in Firetable .
Unit - Kill (Picked unit)
Else - Actions
Hashtable - Clear all child hashtables of child (Key (Picked unit).) in Firetable .
Hashtable - Clear all child hashtables of child (Key (Picked unit).) in Firetable .
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in Fireballs) Equal to 0
Then - Actions
Trigger - Turn off Split_Fireball_Move <gen>
Else - Actions
Credits
Events
Time - Elapsed game time is 0.01 seconds
Conditions
Actions
Quest - Create a Optional quest titled Split Fireball with the description The Split Fireball spell was made by Laserdude! All credits for that spell goes to him! , using icon path ReplaceableTextures\CommandButtons\BTNFireBolt.blp
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.