• 🏆 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!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

[Trigger] Help with a "water wall" spell

Status
Not open for further replies.
Level 3
Joined
Oct 6, 2007
Messages
43
So, I would like to create a "water wall" type spell, which makes the hero shoot a "wall of water" from behind him to in front of him. I have created a dummy unit with a shockwave based skill where its projeticle has been changed to waterfall but I have no idea how to calculate the positions for the dummies so that they are in a line behind the hero.
 
Level 16
Joined
Mar 3, 2006
Messages
1,564
So, I would like to create a "water wall" type spell, which makes the hero shoot a "wall of water" from behind him to in front of him. I have created a dummy unit with a shockwave based skill where its projeticle has been changed to waterfall but I have no idea how to calculate the positions for the dummies so that they are in a line behind the hero.

Get the facing of your hero which will be a real value the represent angle then add 180 degree and when creating the dummy unit, create it at the caster position offset by r and the new angle which will be the hero facing angle + 180 then let that dummy unit cast the spell towards the hero facing angle.
 
Level 8
Joined
Mar 12, 2008
Messages
437
  • I can't find my trousers. Please help.
    • Events
      • Unit - A unit starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Water Wall
    • Actions
      • Set Point[1] = (Position of (Triggering unit))
      • Set Point[2] = ((Position of (Triggering unit)) offset by X towards ((Facing of (Triggering unit)) + 180) degrees
      • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at Point[2]
      • Unit - Add Water Wall Ability to (Last created unit)
      • Unit - Add a 0.01 expiration timer to (Last created unit)
      • Unit - Order (Last created unit) to Tauren Chieftain - Shockwave Point[1]
      • Custom script: call RemoveLocation(udg_Point[1])
      • Custom script: call RemoveLocation(udg_Point[2])
Variables:
Point - Point (duh)
X - A real, which is how long away from the caster the dummy should be created.
Water Wall - The hero ability.
Water Wall Ability - Dummy ability, based on Shockwave.
 
Level 16
Joined
Mar 3, 2006
Messages
1,564
ok here you are but its vauge and I used the same spell for the caster and the dummy also the caster is the dummy which will result in chain cast, you take the idea and change the spell as you see fit. here is the triggers.

  • Untitled Trigger 001
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • Actions
      • Set castpoint = (Target point of ability being cast)
      • Set dummypoint = ((Position of (Triggering unit)) offset by 256.00 towards ((Angle from (Position of (Triggering unit)) to castpoint) + 180.00) degrees)
      • Unit - Create 1 Tauren Chieftain for Player 1 (Red) at dummypoint facing Default building facing degrees
      • Hero - Learn skill for (Last created unit): Orc Tauren Chieftain - Shockwave
      • Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave castpoint
      • Trigger - Turn off (This trigger)
      • -------- remove Turn off, I just added it so the trigger stops creating anymore unit --------
Also note that there are two versions of shock wave when matching the conditions.
 
Last edited:
Level 3
Joined
Oct 6, 2007
Messages
43
OK that explains much, if that what he really needs. I thought he want the wall come from the caster bach toward forward and damaging any enemy it encounter, like Beast Master - stampede ability.

Yes, kind of like that but only one big wave of the shockwaves coming and all of them come at the same time.
 
Level 3
Joined
Oct 6, 2007
Messages
43
In my opinion, it would look really ugly.

By the way, would it be possible to do it so. That first i would create an unit behind the hero, then make it face the hero and then create units with polar offset in a line based on the unit?
 
thats the gist of it.


You set the offset by about like 250? behind the unit (so like, Facing degrees of triggering unit + 180) or something, (facing triggering unit degrees), then after that action, (Facing of Last Created unit + 90) with offsets of like 250, 500, 750, Then you go the other way (Facing of Last Created unit -90) and add your integers by 750 so that it can reset to the middle and go left, (1000, 1250, 1500)
 
Level 8
Joined
Mar 12, 2008
Messages
437
thats the gist of it.


You set the offset by about like 250? behind the unit (so like, Facing degrees of triggering unit + 180) or something, (facing triggering unit degrees), then after that action, (Facing of Last Created unit + 90) with offsets of like 250, 500, 750, Then you go the other way (Facing of Last Created unit -90) and add your integers by 750 so that it can reset to the middle and go left, (1000, 1250, 1500)

Yes, that's it.

It will be easier to make it if you want an odd number of dummies.

Continuation of my previous trigger:

  • I can't find my trousers. Please help.
    • Events
      • Unit - A unit starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Water Wall
    • Actions
      • Set Point[1] = (Position of (Triggering unit))
      • Set Point[2] = ((Position of (Triggering unit)) offset by X towards ((Facing of (Triggering unit)) + 180) degrees
      • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at Point[2]
      • Unit - Add Water Wall Ability to (Last created unit)
      • Unit - Add a 0.01 expiration timer to (Last created unit)
      • Unit Group - Add (Last created unit) to Dummy_Unit_Group
      • For every (Integer A) from 1 to Y, do (Actions)
        • Set Point[3] = Point[3] offset by Z towards ((Facing of (Triggering unit)) + 90) degrees
        • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at Point[2]
        • Unit - Add Water Wall Ability to (Last created unit)
        • Unit - Add a 0.01 expiration timer to (Last created unit)
        • Unit Group - Add (Last created unit) to Dummy_Unit_Group
        • call RemoveLocation(udg_Point[3]
      • For every (Integer A) from 1 to Y, do (Actions)
        • Set Point[3] = Point[3] offset by Z towards ((Facing of (Triggering unit)) - 90) degrees
        • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at Point[2]
        • Unit - Add Water Wall Ability to (Last created unit)
        • Unit - Add a 0.01 expiration timer to (Last created unit)
        • Unit Group - Add (Last created unit) to Dummy_Unit_Group
        • call RemoveLocation(udg_Point[3]
      • Unit Group - Pick every unit in Dummy_Unit_Group and do (Actions)
        • Unit - Order (Picked unit) to Tauren Chieftain - Shockwave Point[1]
      • Custom script: call RemoveLocation(udg_Point[1])
      • Custom script: call RemoveLocation(udg_Point[2])
      • Unit Group - Destroy Dummy_Unit_Group
Variables:
Point - Point (duh)
X - A real, which is how long away from the caster the dummy should be created.
Y - Equal to HALF of total number of dummies - 1. For example, if you want a total of 5 dummies, Y should be 2. If you want a total of 9 dummies, Y should be 4.
Z - Space between every Dummy.
Water Wall - The hero ability.
Water Wall Ability - Dummy ability, based on Shockwave.
Dummy_Unit_Group - A unit group to which the Dummies are added.
 
Level 3
Joined
Oct 6, 2007
Messages
43
Ok solved, but now I got another problem. How can I make the waterfall effect show up when the dummy casts. Now when the dummy casts the skill only a ripple will show on the ground (when shockwave casts it creates a small ripple).
 
Level 16
Joined
Mar 3, 2006
Messages
1,564
Ok solved, but now I got another problem. How can I make the waterfall effect show up when the dummy casts. Now when the dummy casts the skill only a ripple will show on the ground (when shockwave casts it creates a small ripple).

I think its unsolvable because Shockwave always creates a ripple in the ground even if you set the effects to null.
 
Level 3
Joined
Oct 6, 2007
Messages
43
By the way, the spell you made, made the water effects all move into same point, when i would like them to go forward from behind the hero like a wall.
 
Level 8
Joined
Mar 12, 2008
Messages
437
By the way, the spell you made, made the water effects all move into same point, when i would like them to go forward from behind the hero like a wall.

Oh, I know what's wrong. Wait a minute and I'll fix it.

Edit:
  • I can't find my trousers. Please help.
    • Events
      • Unit - A unit starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Water Wall
    • Actions
      • Set Point[1] = (Position of (Triggering unit))
      • Set Point[2] = ((Position of (Triggering unit)) offset by X towards ((Facing of (Triggering unit)) + 180) degrees
      • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at Point[2]
      • Unit - Add Water Wall Ability to (Last created unit)
      • Unit - Add a 0.01 expiration timer to (Last created unit)
      • Unit Group - Add (Last created unit) to Dummy_Unit_Group
      • For every (Integer A) from 1 to Y, do (Actions)
        • Set Point[3] = Point[3] offset by Z towards ((Facing of (Triggering unit)) + 90) degrees
        • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at Point[2]
        • Unit - Add Water Wall Ability to (Last created unit)
        • Unit - Add a 0.01 expiration timer to (Last created unit)
        • Unit Group - Add (Last created unit) to Dummy_Unit_Group
        • call RemoveLocation(udg_Point[3]
      • For every (Integer A) from 1 to Y, do (Actions)
        • Set Point[3] = Point[3] offset by Z towards ((Facing of (Triggering unit)) - 90) degrees
        • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at Point[2]
        • Unit - Add Water Wall Ability to (Last created unit)
        • Unit - Add a 0.01 expiration timer to (Last created unit)
        • Unit Group - Add (Last created unit) to Dummy_Unit_Group
        • call RemoveLocation(udg_Point[3]
      • Unit Group - Pick every unit in Dummy_Unit_Group and do (Actions)
        • Set Point[4] = (Position of (Picked unit)) offset by 180 towards (Facing of (Triggering unit)) degrees
        • Unit - Order (Picked unit) to Tauren Chieftain - Shockwave Point[1]
        • Custom script: call RemoveLocation(udg_Point[4])
      • Custom script: call RemoveLocation(udg_Point[1])
      • Custom script: call RemoveLocation(udg_Point[2])
      • Unit Group - Destroy Dummy_Unit_Group
Variables:
Point - Point (duh)
X - A real, which is how long away from the caster the dummy should be created.
Y - Equal to HALF of total number of dummies - 1. For example, if you want a total of 5 dummies, Y should be 2. If you want a total of 9 dummies, Y should be 4.
Z - Space between every Dummy.
Water Wall - The hero ability.
Water Wall Ability - Dummy ability, based on Shockwave.
Dummy_Unit_Group - A unit group to which the Dummies are added.
 
Status
Not open for further replies.
Top