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
V5Simple Projectile System.w3x
Variables
Initialization
Untitled Trigger 001
system
We set the prsystem
putin
attack
loop
removal
collision
Ability Version
Explaination
Suggestion
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
harvester
unit
No
loc
location
No
wbodyshots
real
Yes
wdmg
real
Yes
wleak
location
Yes
wsfx
string
Yes
wspeed
real
No
wugroup
group
Yes
not needed
Untitled Trigger 001
Events
Map initialization
Conditions
Actions
Environment - Change terrain type at (Center of (Playable map area)) to Ashenvale - Grass using variation -1 in an area of size 50 and shape Circle
For each (Integer A) from 1 to 15 , do (Actions)
Loop - Actions
Destructible - Create a LTlt (Unexpected type: 'destructablecode') at (Random point in (Playable map area)) facing (Random angle) with scale 2.00 and variation 0
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
Visibility - Create an initially Enabled visibility modifier for (Picked player) emitting Visibility across (Playable map area)
For each (Integer A) from 1 to 11 , do (Actions)
Loop - Actions
Unit - Create 1 . Rifleman for Player 1 (Red) at ((Center of (Playable map area)) offset by (900.00, 0)) facing Default building facing degrees
Unit Group - Add (Last created unit) to wugroup[1]
Unit - Add Fire to (Last created unit)
For each (Integer A) from 1 to 2 , do (Actions)
Loop - Actions
Unit - Create 1 . Rifleman for Player 2 (Blue) at (Center of (Playable map area)) facing Default building facing degrees
Unit Group - Add (Last created unit) to wugroup[1]
((Triggering unit) is in wugroup[2].) Equal to True
Actions
-------- The event is added by other actions to try to avoid timer lag. --------
-------- and increase efficiency --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Current flying height of (Triggering unit)) Less than or equal to wbodyshots[1]
Then - Actions
Set Variable Set wleak[1] = (Position of (Triggering unit))
-------- We set it so the group we create is cleaned up after. --------
Custom script: set bj_wantDestroyGroup = true
Unit Group - Pick every unit in (Units within 95.00 of wleak[1].) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of (Picked unit)) Not equal to (Owner of (Triggering unit))
((Picked unit) is alive) Equal to True
(Unit-type of (Picked unit)) Not equal to oooo
Then - Actions
Unit - Cause (Triggering unit) to damage (Picked unit) , dealing wdmg[1] damage of attack type Chaos and damage type Normal
Special Effect - Create a special effect attached to the origin (Unexpected type: 'attachpoint') of (Picked unit) using wsfx[3]
Special Effect - Destroy (Last created special effect)
Else - Actions
Custom script: call RemoveLocation(udg_wleak[1])
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Current flying height of (Triggering unit)) Less than or equal to wbodyshots[2]
Then - Actions
Set Variable Set wleak[1] = (Position of (Triggering unit))
-------- We set it so the group we create is cleaned up after. --------
Custom script: set bj_wantDestroyGroup = true
Unit Group - Pick every unit in (Units within 95.00 of wleak[1].) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of (Picked unit)) Not equal to (Owner of (Triggering unit))
((Picked unit) is alive) Equal to True
(Unit-type of (Picked unit)) Not equal to oooo
Then - Actions
Unit - Cause (Triggering unit) to damage (Picked unit) , dealing wdmg[2] damage of attack type Chaos and damage type Normal
Special Effect - Create a special effect attached to the origin (Unexpected type: 'attachpoint') of (Picked unit) using wsfx[4]
Special Effect - Destroy (Last created special effect)
Else - Actions
Custom script: call RemoveLocation(udg_wleak[1])
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Current flying height of (Triggering unit)) Less than or equal to wbodyshots[3]
Then - Actions
Set Variable Set wleak[1] = (Position of (Triggering unit))
-------- We set it so the group we create is cleaned up after. --------
Custom script: set bj_wantDestroyGroup = true
Unit Group - Pick every unit in (Units within 95.00 of wleak[1].) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of (Picked unit)) Not equal to (Owner of (Triggering unit))
((Picked unit) is alive) Equal to True
(Unit-type of (Picked unit)) Not equal to oooo
Then - Actions
Unit - Cause (Triggering unit) to damage (Picked unit) , dealing wdmg[3] damage of attack type Chaos and damage type Normal
Special Effect - Create a special effect attached to the chest (Unexpected type: 'attachpoint') of (Picked unit) using wsfx[5]
Special Effect - Destroy (Last created special effect)
Else - Actions
Custom script: call RemoveLocation(udg_wleak[1])
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Current flying height of (Triggering unit)) Less than or equal to wbodyshots[4]
Then - Actions
Set Variable Set wleak[1] = (Position of (Triggering unit))
-------- We set it so the group we create is cleaned up after. --------
Custom script: set bj_wantDestroyGroup = true
Unit Group - Pick every unit in (Units within 95.00 of wleak[1].) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of (Picked unit)) Not equal to (Owner of (Triggering unit))
((Picked unit) is alive) Equal to True
(Unit-type of (Picked unit)) Not equal to oooo
Then - Actions
Unit - Cause (Triggering unit) to damage (Picked unit) , dealing wdmg[4] damage of attack type Chaos and damage type Normal
Special Effect - Create a special effect attached to the head (Unexpected type: 'attachpoint') of (Picked unit) using wsfx[6]
Special Effect - Destroy (Last created special effect)
Else - Actions
Custom script: call RemoveLocation(udg_wleak[1])
Else - Actions
Ability Version
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Fire
Actions
-------- We use the correct event to counteract order abuse. --------
-------- We have a condition that identifies the ability. --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Triggering unit) is in wugroup[1].) Equal to True
Then - Actions
Set Variable Set wleak[4] = (Position of (Triggering unit))
Set Variable Set wleak[5] = (Target point of ability being cast)
Unit - Create 1 . oooo for (Owner of (Triggering unit)) at wleak[4] facing (Angle from wleak[4] to wleak[5]) degrees
Special Effect - Create a special effect attached to the chest (Unexpected type: 'attachpoint') of (Last created unit) using wsfx[2]
Animation - Change (Last created unit) flying height to (Random real number between 10.00 and 115.00) at 0.00
Unit - Add a 1.80 second Generic expiration timer to (Last created unit)
Trigger - Add to removal <gen> the event ((Last created unit) Dies)
Unit Group - Add (Last created unit) to wugroup[2]
Custom script: call RemoveLocation(udg_wleak[4])
Custom script: call RemoveLocation(udg_wleak[5])
Else - Actions
-------- We make sure it is in the group to allow for it to use the projectile system and we set the points to remove them later. --------
-------- We create the projectile and attach the effect we already set to it. --------
I was tired of all the poor or over-complicated projectile systems and none ever being just a simple one and the rest seme to be always deleted or lost.
To import my system into your map, it is quite simple.
You just click copy on system folder and paste into your map then all you have to do is add the units you want to use this system to wugroup[1]
Don't forget to go to file - preferances - and click the box to enable automatically CnP'ing unknown variables.
To counteract projectiles flying over doodads or destructibles I suggest modifying the fly over height to 0 to try to stop that.
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.