• 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] Walked Way=Damage

Status
Not open for further replies.
Level 3
Joined
Oct 4, 2007
Messages
27
Hey Guys
I need a Spell That Deal Damage in Region.
But The Damage Must be The lenght the hero walked since activate a Skill.
Can you help me Pls?

Thx:wthumbsup:
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
Well to do so is simple.

You have to design a method of getting the distance walked by the hero, which is sadly a demanding process (involves root opperation being used) so not many units should have it as it will fire atleast 20 times a second (the more the more accurate but also the more demanding). I am sure you are fimiliar with how to do it from your maths leasons (pythagroth (or how ever you spell it)).

Then you simply pick every unit in a region and cause the one unit to inflict damage on them. The damage being a formula which is worked out from the distance walked and other inputs (like multiplyer or offset ect).

Would not recomend it in GUI if it has to be MUI and ultra accurate, still should be easy enough to do.
 
Level 6
Joined
Nov 28, 2007
Messages
203
This prolly works (i'm tired, so i might have forgot something -.-)
  • _Set Duration
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Heroes[(Integer A)] has buff Your Buff) Equal to True
            • Then - Actions
              • Set DurationOf_YourAbility[(Integer A)] = (DurationOf_YourAbility[(Integer A)] + 0.01)
            • Else - Actions
  • Deal Damage In Your Region
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Unit Group - Pick every unit in (Units in (Playable map area) matching ((((Matching unit) has buff Your Buff) Equal to True) and ((Owner of (Matching unit)) Equal to (Player((Integer A)))))) and do (Actions)
            • Loop - Actions
              • Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - 1.00)
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
Would be way easier to check order strings and just set a point when a unit starts the spell.
Then when he ends it, you need to make a second point, and then just check whats the distance beetwin the points.

Don't really know about string commands though.
 
Level 6
Joined
Nov 28, 2007
Messages
203
oops, I forgot two things..

First trigger:
  • Set Duration
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Heroes[(Integer A)] has buff Acid Bomb) Equal to True
            • Then - Actions
              • Set DurationOf_YourAbility[(Integer A)] = (DurationOf_YourAbility[(Integer A)] + 0.01)
            • Else - Actions
              • Set DurationOf_YourAbility[(Integer A)] = 0.00
Second trigger:
  • Deal Damage In Region
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Unit Group - Pick every unit in (Units in (Playable map area) matching ((((Matching unit) has buff Acid Bomb) Equal to True) and ((Owner of (Matching unit)) Equal to (Player((Integer A)))))) and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Int[(Integer A)] Equal to 1
                • Then - Actions
                  • Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - 1.00)
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Int[(Integer A)] Equal to 5
                • Then - Actions
                  • Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - 5.00)
                • Else - Actions
And @ GhostWolf:
Don't understand what u mean >.<
With point: do u mean position or time?
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
I mean a point variable.

What I mean is doing something like this:

  • Untitled Trigger 001
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (Issued order) Equal to (Order(yourSpell_on))
    • Actions
      • Set Point[(Player number of (Owner of (Triggering unit)))] = (Position of (Triggering unit))
  • Untitled Trigger 002
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (Issued order) Equal to (Order(yourSpell_off))
    • Actions
      • Set Point[((Player number of (Owner of (Triggering unit))) + 10)] = (Position of (Triggering unit))
      • Unit - Cause (Triggering unit) to damage circular area after 0.00 seconds of radius (Distance between Point[(Player number of (Owner of (Triggering unit)))] and Point[((Player number of (Owner of (Triggering unit))) + 10)]) at (Point[(Player number of (Owner of (Triggering unit))) + 10)] offset by ((Distance between Point[(Player number of (Owner of (Triggering unit)))] and Point[((Player number of (Owner of (Triggering unit))) + 10)]) / 2.00) towards ((Angle from Point[(Player number of, dealing 100.00 damage of attack type Spells and damage type Normal

A long "Cause unit to" don't you think ? :p
Took me like 3 minutes to make it because all those "player number of"s ^^
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
Ok, I found a UBER ZOMG COOL solution :p

  • Untitled Trigger 001
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (Issued order) Equal to (Order(yourSpell_on))
    • Actions
      • Countdown Timer - Start Timer[(Player number of (Owner of (Triggering unit)))] as a One-shot timer that will expire in 100.00 seconds
  • Untitled Trigger 002
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (Issued order) Equal to (Order(yourSpell_off))
    • Actions
      • Countdown Timer - Pause Timer[(Player number of (Owner of (Triggering unit)))]
      • Set Point[(Player number of (Owner of (Triggering unit)))] = (Position of (Triggering unit))
      • Unit - Cause (Triggering unit) to damage circular area after 0.00 seconds of radius 500.00 at Point[(Player number of (Owner of (Triggering unit)))], dealing ((Elapsed time for Timer[(Player number of (Owner of (Triggering unit)))]) x 10.00) damage of attack type Spells and damage type Normal
      • Custom script: call RemoveLocation(udg_Point[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))])

If you don't want any max time, just set your timer to like 10000000 seconds lol.

The only problem I found is when the units mana finishes.
Im not sure if this will run, anyone knows ? will it consider itself as if the player clicked on disable ?

Oh well, even if not, its just another trigger to add :)

You got to admit this solution pwnz :p
Its even MUI if there is only 1 unit per player that can have this ability !


[Edit] lol I guess I need some sleep... if the unit is just standing there it will still gather damage >.<

  • Untitled Trigger 003
    • Events
      • Unit - A unit Is issued an order targeting a point
    • Conditions
      • ((Triggering unit) has buff Acid Bomb) Equal to True
    • Actions
      • Countdown Timer - Resume Timer[(Player number of (Owner of (Triggering unit)))]
  • Untitled Trigger 004
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • ((Triggering unit) has buff Acid Bomb) Equal to True
      • (Issued order) Equal to (Order(stop))
    • Actions
      • Countdown Timer - Pause Timer[(Player number of (Owner of (Triggering unit)))]

Ok I think this will fix it.
 
Last edited:
Status
Not open for further replies.
Top