• 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.

[Trigger] "Coded" shockwave

Status
Not open for further replies.
Level 7
Joined
Jul 20, 2008
Messages
377
Then add that unit to an unit group for units that have been hit by the dummy. If that unit isn't in the group, damage it and add it to that group. Otherwise, do nothing. I'm assuming by the
  • prefix in the thread title, you want it in GUI. That's why I didn't suggest using the local handle vars system.
 
Level 11
Joined
May 31, 2008
Messages
698
  • Shockwave
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Shockwave
    • Actions
      • Trigger - Add to Shockwave Copy <gen> the event (Unit - A unit comes within 150.00 of Temp_Unit[1])
      • Unit - Create 1 Footman for (Triggering player) at (Position of (Triggering unit)) facing Default building facing degrees
      • Set Temp_Unit[1] = (Last created unit)
      • For each (Integer A) from 1 to 100, do (Actions)
        • Loop - Actions
          • Set Temp_Point[1] = (Position of Temp_Unit[1])
          • Unit - Move Temp_Unit[1] instantly to (Temp_Point[1] offset by 5.00 towards (Angle from (Position of (Triggering unit)) to (Target point of ability being cast)) degrees)
  • Shockwave Damage
    • Events
    • Conditions
    • Actions
      • Unit - Cause Temp_Unit[1] to damage (Triggering unit), dealing 500.00 damage of attack type Spells and damage type Magic
This shud work. Just remove any leaks. Also use arithmatic to change the damage so that the casting units strength and whatever gives more damage. You will have to set casting unit to a variable.
 
Level 18
Joined
Oct 18, 2007
Messages
930
  • Shockwave
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Shockwave
    • Actions
      • Trigger - Add to Shockwave Copy <gen> the event (Unit - A unit comes within 150.00 of Temp_Unit[1])
      • Unit - Create 1 Footman for (Triggering player) at (Position of (Triggering unit)) facing Default building facing degrees
      • Set Temp_Unit[1] = (Last created unit)
      • For each (Integer A) from 1 to 100, do (Actions)
        • Loop - Actions
          • Set Temp_Point[1] = (Position of Temp_Unit[1])
          • Unit - Move Temp_Unit[1] instantly to (Temp_Point[1] offset by 5.00 towards (Angle from (Position of (Triggering unit)) to (Target point of ability being cast)) degrees)
  • Shockwave Damage
    • Events
    • Conditions
    • Actions
      • Unit - Cause Temp_Unit[1] to damage (Triggering unit), dealing 500.00 damage of attack type Spells and damage type Magic
This shud work. Just remove any leaks. Also use arithmatic to change the damage so that the casting units strength and whatever gives more damage. You will have to set casting unit to a variable.

Ok first of all, this fails. It will not work.

You need to move a unit over time, like every 0.03 seconds interval, NOT 100 timed loop. AND for dealing damage you need to pick every units within "yourrange" of the missile and damage that picked unit
 
Level 6
Joined
Mar 20, 2008
Messages
208
You could attempt to build a custom region using jass, I've never done it before nor know how efficient it might be, but these are found within JassCraft

JASS:
native RegionAddCell           takes region whichRegion, real x, real y returns nothing

native RegionAddRect            takes region whichRegion, rect r returns nothing

They may prove useful.
 
Level 11
Joined
May 31, 2008
Messages
698
Dynasti i think that i am right... Ur right that it doesnt move thats cuz i forgot to add wait .03 seconds at the end of the loop :p. But picking every unit within range wont work. That could cause it to damage a unit twice. You have to do a unit comes within range of the shockwave and then damage that unit, which is what i did. For moving it you could also make a separate trigger that makes the all shockwave units move forward every .01 or .03 or whatever seconds. Do this by adding the created shockwave into a group and then remove it maybe 2 seconds later. And another trig that moves the units in that group forward 6 units every .01 seconds or sumthin like that.
 
Status
Not open for further replies.
Top