• 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!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Rocket Strike

Status
Not open for further replies.
Level 8
Joined
Aug 19, 2006
Messages
185
I m making an ability "Storm bolt based rocket strike" it have 2500 range. And i want to add "push" effect. I am using WE. Pls give me its triggers.
 

Attachments

  • lol.JPG
    lol.JPG
    13.7 KB · Views: 175
Level 15
Joined
Feb 9, 2006
Messages
1,598
code
Rocket Strike
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Rocket Strike
Actions
Set TriggeringUnitPointVar = (Position of (Triggering unit))
For each (Integer A) from 1 to 1, do (Actions)
Loop - Actions
Unit - Create 1 Dum Dum for (Owner of (Triggering unit)) at (Position of (Target unit of ability being cast)) facing Default building facing degrees
Unit - Order (Last created unit) to Neutral - Breath Of Frost ((Position of (Triggering unit)) offset by 100.00 towards NovaRotationTargetVar degrees)
Set NovaRotationTargetVar = (NovaRotationTargetVar + 10.00)
code2
Pushback Copy
Events
Time - Every 0.01 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in (Units in (Playable map area) matching (((Matching unit) has buff pandaa ) Equal to True)) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) is alive) Equal to True
((Picked unit) is A ground unit) Equal to True
Then - Actions
Unit - Move (Picked unit) instantly to ((Position of (Picked unit)) offset by 50.00 towards (Angle from TriggeringUnitPointVar to (Position of (Picked unit))) degrees)
Else - Actions
Do nothing
Breathe of Frost gives pandaa buff to enemy.

I made that but i have a problem. It pushes only one time. I want to increase it. What must i change? Please help me.


If you use [Trigger [/Trigger Instead of ''Box'', it would be much easier to read
 
Level 24
Joined
Jun 26, 2006
Messages
3,406
It's just [TRIGGER][HIGHLIGHT]<Your trigger text here>[/code][/TRIGGER]

Everything else happens automatically.
 
Level 8
Joined
Aug 19, 2006
Messages
185
  • Rocket Strike
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Rocket Strike
    • Actions
      • Set TriggeringUnitPointVar = (Position of (Triggering unit))
      • For each (Integer A) from 1 to 1, do (Actions)
        • Loop - Actions
          • Unit - Create 1 Dum Dum for (Owner of (Triggering unit)) at (Position of (Target unit of ability being cast)) facing Default building facing degrees
          • Unit - Order (Last created unit) to Neutral - Breath Of Frost ((Position of (Triggering unit)) offset by 100.00 towards NovaRotationTargetVar degrees)
          • Set NovaRotationTargetVar = (NovaRotationTargetVar + 10.00)
  • Pushback Copy
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area) matching (((Matching unit) has buff pandaa ) Equal to True)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is alive) Equal to True
              • ((Picked unit) is A ground unit) Equal to True
            • Then - Actions
              • Unit - Move (Picked unit) instantly to ((Position of (Picked unit)) offset by 50.00 towards (Angle from TriggeringUnitPointVar to (Position of (Picked unit))) degrees)
            • Else - Actions
              • Do nothing
 
Last edited by a moderator:
Level 27
Joined
Feb 22, 2006
Messages
3,052
Welllll...
Few things:
0.01 seconds will lag, and cause you INFINITE PAIN AND DOOM!
Change to 0.03-0.05, those will run about as smoothly, with 90% less lag.
also, your periodic trigger leaks (3 times!), which will also cause you INFINITE PAIN AND DOOM!
To fix this, do such
  • Set Var_ALP = Position of Picked Unit
  • Set Var_ALP2 = ALP offset by 50 toward (Angle from TriggeringUnitPointVar to (ALP)) degrees)
  • custom script: call RemoveLocation(udg_Var_ALP)
  • custom script: call RemoveLocation(udg_Var_ALP2)
Do this where you would use a point. NOTE that polar projection uses 2 locations rather than one. Groups leak too. Therefore, we must do:
  • Set Var_ALG = Units in (Playable map area) matching (((Matching unit) has buff pandaa ) Equal to True)
  • Unit Group - Pick every unit in (Var_ALG) and do (Actions)
  • Loop - Actions
  • blah blah blah
  • //When you are done with your actions, put this at the very end of your trigger:
  • custom script: call DestroyGroup(udg_Var_ALG)
You have leaks in your initialization trigger, but I'll let u find them yourself as a learning experience ;)
Third: In order to make this a 600 distance jump, then your distance is probably too much, unless your buff lasts really short.
My advice: To do this more accurately, since a unit might get a buff dispelled or something, (and seeing as how the way you wrote this, it already isn't Multiinstancable) Do:
  • Unit - A unit Starts the effect of an ability
  • Conditions
  • (Ability being cast) Equal to Rocket Strike
  • Actions
  • Set VAR_UnitTraget = Unit of Target Ability being cast.
  • Wait 1.00 seconds
  • Set VAR_UnitTarget = No Unit.
  • Time - Every 0.05 seconds of game time
  • Set Var_ALP = (Position of (VAR_UnitTarget)
  • Set Var_ALP2 = (Var_ALP) offset by 30 towards (Angle from TriggeringUnitPointVar to (Position of (Picked unit))) degrees)
  • Unit - Move (Var_UnitTarget) instantly to (ALP2)
However, if you want it to be a group of units to slide, make these simple changes:
  • Set VAR_UnitTarget = Unit of Target Ability being cast.
Changes to:
  • Set Var_ALP = Position of (Unit of Target Ability being cast.
  • Set VAR_GroupTarget = Units within (<YOUR AOE HERE>) of Var_ALP
  • custom script: call RemoveLocation(udg_VAR_ALP)
  • Wait 1.00 seconds
  • custom script: call DestroyGroup(udg_VAR_GroupTarget)
And
  • Time - Every 0.05 seconds of game time
  • Set Var_ALP = (Position of (VAR_UnitTarget)
  • Set Var_ALP2 = (Var_ALP) offset by 30 towards (Angle from TriggeringUnitPointVar to (Position of (Picked unit))) degrees)
  • Unit - Move (Var_UnitTarget) instantly to (ALP2)
changes to:
  • Time - Every 0.05 seconds of game time
  • Unit Group - Pick every unit in VAR_GroupTarget and do actions:
  • Loop - Actions
  • Set Var_ALP = (Position of (Picked Unit)
  • Set Var_ALP2 = (Var_ALP) offset by 30 towards (Angle from TriggeringUnitPointVar to (Position of (Picked unit))) degrees)
  • Unit - Move (Picked Unit) instantly to (ALP2)
There are many other ways to improve this trigger, but none without handle variables like I said before...
Feel free to ask any questions about this.
--donut3.5--
 
Level 27
Joined
Feb 22, 2006
Messages
3,052
Ok, I pretty much made it for you anyways, but here goes:
This is your first trigger:
  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Rocket Strike
  • Actions
    • Set VAR_UnitTraget = Unit of Target Ability being cast.
    • Set TriggeringUnitPointVar = Position of (Triggering Unit)
    • Wait 1.00 seconds
    • Set VAR_UnitTarget = No Unit.
This is your second trigger:
  • Events
    • Time - Every 0.05 seconds of game time
  • Conditions
  • Actions
    • Set Var_ALP = (Position of (VAR_UnitTarget)
    • Set Var_ALP2 = (Var_ALP) offset by 30 towards (Angle from TriggeringUnitPointVar to ALP) degrees)
    • Unit - Move (Var_UnitTarget) instantly to (ALP2)
    • Custom Script: call RemoveLocation(udg_Var_ALP)
    • Custom Script: call RemoveLocation(udg_Var_ALP2)
The variables you need in this are:
TriggeringUnitPointVar which is a point with no array and no initial value.
Var_ALP which is a point with no array and no initial value.
Var_ALP2 which is a point with no array and no initial value.
And That's it. Tell me if this doesn't work, I haven't tested it.
--donut3.5--
 
Last edited by a moderator:
Status
Not open for further replies.
Top