🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
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
SPELL_demolisher.w3x
Variables
Initialization
Melee Initialization
Melee Initialization2
Demolisher
demolisher2
demolisher3
Release
Release 2
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
Caster
unit
No
Chain
unit
Yes
Chainpoint
location
Yes
Edge
unit
Yes
integer
integer
No
integer2
integer
No
LastAngle
real
No
Point
location
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)
Melee Game - Set starting resources (for all players)
vision
Melee Initialization2
Events
Time - Elapsed game time is 1.00 seconds
Conditions
Actions
Visibility - Create an initially Enabled visibility modifier for Player 1 (Red) emitting Visibility across vision <gen>
demolisher starts
Demolisher
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Demolisher
Actions
Unit Group - Pick every unit in (Units of type Chain (Level 1)) and do (Actions)
Loop - Actions
Unit - Remove (Picked unit) from the game
Set Variable Set Caster = (Casting unit)
Set Variable Set Point = (Target point of ability being cast)
Unit - Create 1 Edge (Level 1) for Player 1 (Red) at ((Position of Caster) offset by 30.00 towards (Angle from (Position of Caster) to Point) degrees.) facing Point
Set Variable Set Edge[1] = (Last created unit)
Set Variable Set Edge[3] = No unit
Set Variable Set Chain[20] = (Last created unit)
Set Variable Set integer = "0"
Set Variable Set integer2 = "20"
Unit - Add Release Demolisher to Caster
Unit - Remove Demolisher from Caster
demolisher2
Events
Time - Every 0.03 seconds of game time
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
integer Less than 20
Then - Actions
Unit - Move Edge[1] instantly to ((Position of Edge[1]) offset by 30.00 towards (Angle from (Position of Caster) to Point) degrees.)
Unit - Create 1 . Chain (Level 1) for Player 1 (Red) at (Position of Edge[1]) facing (Angle from (Position of Caster) to Point) degrees
Set Variable Set Chain[integer] = (Last created unit)
Set Variable Set Chainpoint[integer] = (Position of (Last created unit))
Set Variable Set integer = (integer + 1)
Else - Actions
Do nothing
demolisher3
Events
Time - Every 0.03 seconds of game time
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
integer Greater than or equal to 20
Then - Actions
Set Variable Set Edge[1] = No unit
Unit - Move Chain[1] instantly to ((Position of Caster) offset by 30.00 towards (Facing of Caster) degrees.) , facing (Position of Chain[2])
Unit - Move Chain[2] instantly to ((Position of Chain[1]) offset by 30.00 towards (Angle from (Position of Chain[1]) to (Position of Chain[3])) degrees.) , facing (Position of Chain[3])
For each (Integer A) from 3 to 19 , do (Actions)
Loop - Actions
Unit - Move Chain[(Integer A)] instantly to ((Position of Chain[((Integer A) - 1)]) offset by 30.00 towards (Angle from (Position of Chain[((Integer A) - 2)]) to (Position of Chain[((Integer A) + 1)])) degrees.) , facing (Position of Chain[((Integer A) + 1)])
Unit - Move Chain[20] instantly to (Position of Chain[19]) , facing (Position of Chain[18])
Else - Actions
Do nothing
release demolish starts
Release
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Release Demolisher
Actions
Set Variable Set Edge[3] = Chain[20]
Set Variable Set Chain[20] = No unit
Set Variable Set LastAngle = (Facing of Chain[18])
Unit - Add a 2.00 second Generic expiration timer to Edge[3]
For each (Integer A) from 0 to 19 , do (Actions)
Loop - Actions
Unit - Add a (0.60 - (0.03 x (Real((Integer A))))) second Generic expiration timer to Chain[(Integer A)]
Wait 0.70 seconds
Unit - Add Demolisher to Caster
Unit - Remove Release Demolisher from Caster
Release 2
Events
Time - Every 0.03 seconds of game time
Conditions
Actions
Unit - Move Edge[3] instantly to ((Position of Edge[3]) offset by 30.00 towards LastAngle degrees.)
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.