• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Shockwave damage based on stats

Status
Not open for further replies.
Level 4
Joined
Nov 17, 2007
Messages
57
hi :) how do i make a Shockwave spell that does damage based on strength? the "Damage Area" says "bla bla bla a circulair area".. and thats not exactly shockwaveish :(

I got the spell based on shockwave already, set everyone as i want it, now i just need the trigger that does the damage - any ideas?
 
Level 13
Joined
Sep 14, 2008
Messages
1,407
Well i suppose you need a trigger similar to this one:


Event: Unit begins effect of ability
Condition:Ability being cast = shockwave
Action:
For(1 - 10)
(
Pick eveyr unit withhin position of casting unit offset by 100x integer a facing "heros facing" and do actions:
(
if(unit is in "alreadyHit" = false)
(
Add unit to "alreadyHit" (unit group)
Make casting unit deal "yourDamage" to picked unit
)
)
)
 
Level 10
Joined
Sep 21, 2007
Messages
517
i suggest using a dummy to act as the wave itself and damage incoming units, dealing damage based on the str of the hero. make it act like a missile particle, moving it w/e dist per 0.03 or w/e seconds. to deal str damage just get the str of hero and multiply it by some base damage or w/e ud like. Hope i helped.
if you use loops the shockwave wont look really realistic because of how fast the shockwave will occur, no offense of course darkangel, it still works.
 
Level 4
Joined
Nov 17, 2007
Messages
57
meh.. that looks really confusing >.< can 1 of you maybe type the exact triggers? i know its a bit much to ask but ive never made this kind of triggered spell >.<
 
Level 10
Joined
Sep 21, 2007
Messages
517
nah its not, really it isnt, just creating a dummy unit with w/e model you want and adding locust to it, as for the moving create something like this (please dont do it exactly, instead try to make it more efficient cus what i just did isnt efficient since it isnt MUI and spell values cannot be changed easily (i did remove memory leaks, the things in jass, you can ignore if u want), just trying to teach you the method:
  • Untitled Trigger 002
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to yourability
    • Actions
      • Set caster = (Triggering unit)
      • Set tempPoint[0] = (Position of (Triggering unit))
      • Unit - Create 1 DUMMY for (Owner of (Triggering unit)) at tempPoint[0] facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_tempPoint[0])
      • Set dummy = (Last created unit)
      • Set distance = 0.00
      • Trigger - Turn on Untitled Trigger 001 <gen>
  • Untitled Trigger 001
    • Events
      • Time - Every 0.02 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • distance Greater than or equal to 700.00
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
      • Set distance = (distance + 25.00)
      • Set tempPoint[0] = (Position of dummy)
      • Set tempPoint[1] = (tempPoint[0] offset by 25.00 towards (Facing of dummy) degrees)
      • Custom script: call RemoveLocation(udg_tempPoint[0])
      • Unit - Move dummy instantly to tempPoint[1]
      • Set DamageGroup = (Units within 125.00 of tempPoint[1] matching (((Matching unit) belongs to an enemy of (Owner of dummy)) Equal to True))
      • Custom script: call RemoveLocation(udg_tempPoint[1])
      • Unit Group - Pick every unit in DamageGroup and do (Actions)
        • Loop - Actions
          • -------- this is damage per every 0.02 seconds btw --------
          • -------- for it to deal damage only once to a unit every w/e seconds the trigger will be harder --------
          • -------- just trying to show you how it basically works --------
          • Unit - Cause dummy to damage (Picked unit), dealing (Real((Strength of caster (Exclude bonuses)))) damage of attack type Spells and damage type Normal
 
Status
Not open for further replies.
Top