• 🏆 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!

[Trigger] D.o.T. trigger

Status
Not open for further replies.
Level 4
Joined
Jul 18, 2008
Messages
73
  • Shadow Pain
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to DoT
    • Actions
      • Set ShdwPainTarg = (Target unit of ability being cast)
      • For each (Integer B) from 1 to 10, do (Actions)
        • Loop - Actions
          • Special Effect - Create a special effect attached to the origin of ShdwPainTarg using Abilities\Spells\Undead\CarrionSwarm\CarrionSwarmDamage.mdl
          • Set ShadowPain = 5.00
          • Set ShadowPain = (ShadowPain x ShadowPowerss)
          • Unit - Cause (Triggering unit) to damage ShdwPainTarg, dealing ShadowPain damage of attack type Spells and damage type Normal
          • Wait 1.00 game-time seconds
it works, but i have 1 problem,
when i cast same spell on same target 2 or more times, it stacks :\
how can i make it not stack

like imagine spell unholy frenzy
you can cast it on multiple enemies and it doesn't stack, just refreshes


thx
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
I would use a timer instead of wait and destroy the special effect leak.
This is just an optional idea, but: create a unit variable (init = no unit), when the ability is cast set it to the targetted unit, if the variable = no unit, it hasn't been casted yet, if it has been casted, skip the remaining actions.
 
Level 4
Joined
Jul 18, 2008
Messages
73
create a unit variable (init = no unit), when the ability is cast set it to the targetted unit, if the variable = no unit, it hasn't been casted yet, if it has been casted, skip the remaining actions.

sry i don't get this part :confused:
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
sry i don't get this part :confused:

Well, the first part of that is quite simple I think ^^
Create a unit variable, which is initially set to "No Unit".

First set the variable you've just created to the targetted unit
Create an if/then/else-function behind that, but in front of your other actions and set the condition to something like "Variable_Unit equal to no unit".
Then, if the variable is "no unit", run your actions (set them in the "then"-part).
I don't think you need anything in the else-part, since you don't want the actions to run when the unit is already targetted.

After the if/then/else, set the variable back to "No Unit" ;)
 
Level 4
Joined
Jul 18, 2008
Messages
73
Well, the first part of that is quite simple I think ^^
Create a unit variable, which is initially set to "No Unit".

First set the variable you've just created to the targetted unit
Create an if/then/else-function behind that, but in front of your other actions and set the condition to something like "Variable_Unit equal to no unit".
Then, if the variable is "no unit", run your actions (set them in the "then"-part).
I don't think you need anything in the else-part, since you don't want the actions to run when the unit is already targetted.

After the if/then/else, set the variable back to "No Unit" ;)

  • Shadow Pain
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Shadow Word: Pain (Priest)
    • Actions
      • Set AAA = (Targeted unit)
      • Set ShdwPainTarg = (Target unit of ability being cast)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • AAA Equal to No unit
        • Then - Actions
          • For each (Integer B) from 1 to 10, do (Actions)
            • Loop - Actions
              • Special Effect - Create a special effect attached to the origin of ShdwPainTarg using Abilities\Spells\Undead\CarrionSwarm\CarrionSwarmDamage.mdl
              • Set ShadowPain = 5.00
              • Set ShadowPain = (ShadowPain x ShadowPowerss)
              • Unit - Cause (Triggering unit) to damage ShdwPainTarg, dealing ShadowPain damage of attack type Spells and damage type Normal
              • Wait 1.00 game-time seconds
        • Else - Actions

you mean that?
 
Level 8
Joined
Aug 4, 2008
Messages
279
Hm, u dont have to set the Damage = 5, u can set it as its initial value in the variables manage.And why u use waits?u done need they.
After creating a special effect, destroy it
Special Effect - Destroy Last Created Special Effect
Removing waits will make it MUI.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Hm, u dont have to set the Damage = 5, u can set it as its initial value in the variables manage.And why u use waits?u done need they.
After creating a special effect, destroy it
Special Effect - Destroy Last Created Special Effect
Removing waits will make it MUI.

1) yep
2) yep
3) removing waits will make it an instant-spell, though it's supposed to do damage over time, I suggest a timer though ;)
 
Level 13
Joined
Mar 4, 2009
Messages
1,156
  • Shadow Pain
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to DoT
    • Actions
      • Set ShdwPainTarg = (Target unit of ability being cast)
      • For each (Integer B) from 1 to 10, do (Actions)
        • Loop - Actions
          • Special Effect - Create a special effect attached to the origin of ShdwPainTarg using Abilities\Spells\Undead\CarrionSwarm\CarrionSwarmDamage.mdl
          • Set ShadowPain = 5.00
          • Set ShadowPain = (ShadowPain x ShadowPowerss)
          • Unit - Cause (Triggering unit) to damage ShdwPainTarg, dealing ShadowPain damage of attack type Spells and damage type Normal
          • Wait 1.00 game-time seconds
it works, but i have 1 problem,
when i cast same spell on same target 2 or more times, it stacks :\
how can i make it not stack

like imagine spell unholy frenzy
you can cast it on multiple enemies and it doesn't stack, just refreshes


thx

you can add ability with no icon called "NO EFFECT" (you can use ability for attack bonus and set it to + 0 )

add in your action

IF
level of "NO EFFECT" for (target unit of ability being cast) equal to 0
than
add "NO EFFECT" to (target unit of ability being cast)
..............

on this way im shure it will not stack
 
Level 8
Joined
Apr 7, 2008
Messages
176
I think a timer would be a great idea. Otherwise you're stuck with using Every 1 second action, and that looks crappy when you use it multiple times because when you hold ALT all the units life drops at the same time. :p
Whereas with multiple timers would let if damage units individually.
 
Level 4
Joined
Jun 16, 2009
Messages
92
You could always make the Acid Bomb ability single target, and just do damage that way...


...but if you really 'must' trigger it.

Unit casts Ability.
Ability = Shadowwhatever.
Put unit into unit group.

Make another trigger.

Every 1 second, or .5 seconds, or .25 seconds, whatever.
Pick every unit in unit group.
If Then Else Multiple functions.
If Picked Unit has specific buff Shadowthing
Then do, ShadowDamage to picked unit.
Special effect thing on picked unit.
Destroy last created special effect.

Else, remove unit from Unit group. (This will take the unit out of the unit group if it does not have your debuff.)


Simple enough.
 
Status
Not open for further replies.
Top