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

Help. Can [Sleep] be combined with banish in 1 spell? or sleep + banish effect for bonus damage take

Status
Not open for further replies.
Level 6
Joined
Aug 31, 2018
Messages
157
i want to make sleep + banish in 1 spell but my dummy dont work.. It appears but the enemy is not banished, why?

Is there a way to do sleep + effect of banish for bonus damage taken from abillities, thats what i want to do.

  • Spy Snipe Banish
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Sleep [E]
    • Actions
      • Set Caster_point = (Position of (Triggering unit))
      • Set Target_unit = (Target unit of ability being cast)
      • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at Caster_point facing (Facing of (Triggering unit)) degrees
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Unit - Add Banish to (Last created unit)
      • Unit - Order (Last created unit) to Human Blood Mage - Banish Target_unit
      • Custom script: call RemoveLocation (udg_Caster_point)
      • Custom script: set udg_Target_unit = null
 
Last edited:
Level 6
Joined
Aug 31, 2018
Messages
157
Nvm did it, the problem was that [Sleep] make the target immo. and u are not able to cast any spells. So i made it to 0.10 sec (cause if its 0, the target became immo forever, its a bug) then i made the dummy wait 1 sec before cast banish, and thats how it worked ^^
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,565
You shouldn't need anything longer than a ~0.50 sec expiration timer if your dummy is setup properly. Dummys cast spells instantly. The only delay comes from spells with missile speeds like Acid Bomb for example and this delay is just the time it takes for the missile to reach it's target and apply the effects of the ability. Also, you don't have to worry about the angle your dummy is facing because the dummy doesn't need to turn to cast.

And about your ability. You don't need to add a delay for Banish + Sleep to work. I attached a map with a working example. The Hero casts Banish and the Dummy casts Sleep.

Another thing. In your trigger above you don't need to "set udg_Target_unit = null". You can simply use the standard Unit variable to track the target of the ability being cast. There's no Waits so you don't have to worry about the variable changing to a different unit.

Also, here's how you would properly shadow a global variable if there was a Wait:
  • Global Variable Shadowing
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Kill After 2 Seconds
    • Actions
      • Custom script: local unit udg_target = GetSpellTargetUnit()
      • Wait 2.00 seconds
      • Unit - Kill target
      • Custom script: set udg_target = null
You need to set the target variable using custom script rather than the normal GUI way. Also, you can only do this at the start of your Actions like how I've done it. Local variables have to be set first before anything else.

Last note: If you wanted to combine this into 1 spell you could do so using a Damage Engine. To do so you have to remove the Banish spell from the equation. Instead, simply put the unit to Sleep. Then using the Damage Engine detect when a unit takes damage from a spell AND has the Sleep buff. When a unit meets these requirements you increase the damage dealt by the spell by the same amount that Banish would. Something like "Set damage = damage * 1.66". If you have other sources of Banish in your map then you might want to make sure that this checks for those. Otherwise, the unit could take multiplied damage from the standard Banish buff and our Damage Engine version which would result in something like (damage * 1.66) * 1.66.
 

Attachments

  • Sleep and Banish.w3x
    18.4 KB · Views: 15
Last edited:
Level 6
Joined
Aug 31, 2018
Messages
157
You shouldn't need anything longer than a ~0.50 sec expiration timer if your dummy is setup properly. Dummys cast spells instantly. The only delay comes from spells with missile speeds like Acid Bomb for example and this delay is just the time it takes for the missile to reach it's target and apply the effects of the ability. Also, you don't have to worry about the angle your dummy is facing because the dummy doesn't need to turn to cast.

Anyway, you don't need to add a delay for Banish + Sleep to work. I attached a map with an example of this working. The Hero casts Banish and the Dummy casts Sleep.

Another thing. In your trigger above you don't need to "set udg_Target_unit = null". You can simply use the standard Unit variable to track the target of the ability being cast. There's no Waits so you don't have to worry about the variable changing to a different unit.

Also, here's how you would properly shadow a global variable if there was a Wait:
  • Global Variable Shadowing
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Kill After 2 Seconds
    • Actions
      • Custom script: local unit udg_target = GetSpellTargetUnit()
      • Wait 2.00 seconds
      • Unit - Kill target
      • Custom script: set udg_target = null
You need to set target using custom script rather than the normal GUI way. Also, you can only do this at the start of your Actions like how I've done it. Local variables have to be set first before anything else.

Last note: If you wanted to combine this into 1 spell you could do so using a Damage Engine. Basically, just remove the Banish spell from the equation. You simply put the unit to sleep and then with the Damage Engine detect when a unit takes damage from a spell AND has the Sleep buff. When a unit does, increase the damage dealt by the spell by the same amount that Banish would. Something like "Set damage = damage * 1.66". If you have other sources of Banish in your map then you might want to make sure that this checks for those. Otherwise, the unit could take multiplied damage from the standard Banish buff and our Damage Engine version:
(damage * 1.66) * 1.66.
Is it hard to put/use damage engine? Never tried to do it cause it looks too difficult for me, i am not good at triggers also. (+ its my first time using dummies)
 
Level 9
Joined
Jul 30, 2018
Messages
445
Is it hard to put/use damage engine?

No, there are guides to install it on the site, but basically you just copy the triggers needed from the Damage Engine example map to yours and then you get a bunch of new events. Damage Engine 5.4.2.3

To achieve what Uncle above explained you can make a trigger like this:

Events:
- DamageEventModifier becomes equal to 1.00
Conditions:
- (DamageEventTarget) has Sleep (your buff)
- IsDamageSpell equal to True
Actions:
- Set DamageEventAmount = (DamageEventAmount) * 1.66
 
Level 6
Joined
Aug 31, 2018
Messages
157
No, there are guides to install it on the site, but basically you just copy the triggers needed from the Damage Engine example map to yours and then you get a bunch of new events. Damage Engine 5.4.2.3

To achieve what Uncle above explained you can make a trigger like this:

Events:
- DamageEventModifier becomes equal to 1.00
Conditions:
- (DamageEventTarget) has Sleep (your buff)
- IsDamageSpell equal to True
Actions:
- Set DamageEventAmount = (DamageEventAmount) * 1.66
upload_2020-1-8_18-16-28.png
 
Level 6
Joined
Aug 31, 2018
Messages
157
No, there are guides to install it on the site, but basically you just copy the triggers needed from the Damage Engine example map to yours and then you get a bunch of new events. Damage Engine 5.4.2.3

To achieve what Uncle above explained you can make a trigger like this:

Events:
- DamageEventModifier becomes equal to 1.00
Conditions:
- (DamageEventTarget) has Sleep (your buff)
- IsDamageSpell equal to True
Actions:
- Set DamageEventAmount = (DamageEventAmount) * 1.66
I now have these things
upload_2020-1-8_21-45-50.png

but i dont have any idea how to use them, literally. Can you help me?
 
Level 6
Joined
Aug 31, 2018
Messages
157
They are just variables to use in your triggers. Like the one I showed you above.
  • Sleep E
    • Events
      • Game - DamageModifierEvent becomes Equal to 1.00
    • Conditions
      • IsDamageSpell Equal to True
    • Actions
      • Set DamageEventAmount = (DamageEventAmount x 2.00)
Can't find the conditions, all of them have *equal to* i really can't find Conditions:
- (DamageEventTarget) has Sleep (your buff)
 
Level 6
Joined
Aug 31, 2018
Messages
157
Okey, this works perfectly.
  • Actions
  • Set Caster_point = (Position of (Triggering unit))
    • Set Target_unit = (Target unit of ability being cast)
    • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at Caster_point facing (Facing of (Triggering unit)) degrees
    • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
    • Unit - Add Banish to (Last created unit)
    • Wait 0.11 seconds
    • Unit - Order (Last created unit) to Human Blood Mage - Banish Target_unit
    • Custom script: call RemoveLocation (udg_Caster_point)
    • Custom script: set udg_Target_unit = null
But how to add this effect?

  • Sleep spell dmg
    • Events
      • Game - DamageModifierEvent becomes Equal to 1.00
    • Conditions
      • (DamageEventTarget has buff Sleep) Equal to True
      • IsDamageSpell Equal to True
    • Actions
      • Set DamageEventAmount = (DamageEventAmount x 2.00)
 
Level 9
Joined
Jul 30, 2018
Messages
445
No, the whole point of Damage Engine was that you don't need the dummy unit at all. Just use the spell you use to put the Sleep with (I'm guessing the ability is Sleep). You probably wanted to add Banish because of the magic damage bonus? Now you don't need Banish, because that Sleep spell dmg trigger will do the bonus damage and Sleep adds the debuff. And I think you can add multiple effects to Sleep on the Object Editor. Or you can add the effect to the buff. Or you can simply add the effect with triggers, there's tons of ways.
 
Level 6
Joined
Aug 31, 2018
Messages
157
No, the whole point of Damage Engine was that you don't need the dummy unit at all. Just use the spell you use to put the Sleep with (I'm guessing the ability is Sleep). You probably wanted to add Banish because of the magic damage bonus? Now you don't need Banish, because that Sleep spell dmg trigger will do the bonus damage and Sleep adds the debuff. And I think you can add multiple effects to Sleep on the Object Editor. Or you can add the effect to the buff. Or you can simply add the effect with triggers, there's tons of ways.

This trigger is not working, why?
  • Sleep spell dmg
    • Events
      • Game - DamageModifierEvent becomes Equal to 1.00
    • Conditions
      • (DamageEventTarget has buff Sleep ) Equal to True
      • IsDamageSpell Equal to True
    • Actions
      • Set DamageEventAmount = (DamageEventAmount x 5.00)
 
Level 6
Joined
Aug 31, 2018
Messages
157
Sigh... There are a million things why it wouldn’t work. You have to give a litte more information than that.
above u said i have to do this trigger and i did it, what else i must do? There is just a sleep abillity with sleep buff like in the trigger

As i said, i downloaded the detection system yesterday, i literally have no idea how to work with it, also i am not that good with triggers
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,565
  • Cast Sleep and Banish
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Sleep and Banish (Main Ability)
    • Actions
      • Set target = (Target unit of ability being cast)
      • Set point = (Position of target)
      • -------- - --------
      • Unit - Create 1 Dummy (Uncle) for (Triggering player) at point facing Default building facing degrees
      • Set dummy = (Last created unit)
      • Unit - Add a 0.50 second Generic expiration timer to dummy
      • Unit - Add Sleep (Dummy) to dummy
      • Unit - Order dummy to Undead Dreadlord - Sleep target
      • -------- - --------
      • Custom script: call RemoveLocation(udg_point)
Like I said before, you don't need a delay to make that trigger work. The Hero casts Banish, the Dummy casts Sleep.

But that's besides the point. Why are you still using a Dummy to cast Banish if you're using the Damage Detection System? The point of the DDS is to remove the need of having to do that.

1) Your Hero casts the Sleep ability applying the normal Sleep effects and Sleep buff. 2) The Damage Detection System detects when a unit with that sleep buff takes damage from a spell and multiplies the damage.

This is the only trigger you need. Make sure the buffs match.
  • Sleep Bonus Damage
    • Events
      • Game - DamageModifierEvent becomes Equal to 1.00
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (DamageEventTarget has buff Sleep) Equal to True
          • IsDamageSpell Equal to True
        • Then - Actions
          • Set DamageEventAmount = (DamageEventAmount x 2.00)
        • Else - Actions
It's assumed that you want the ability to work this way. That is that the first Spell Damage dealt to the sleeping unit deals bonus damage and wakes it up. Because that's how it would function with Banish + Sleep. One thing to note is that this trigger doesn't take into consideration Magic damage.

I uploaded an example.
 

Attachments

  • Sleep and Banish 2.w3x
    44.7 KB · Views: 17
Last edited:
Level 6
Joined
Aug 31, 2018
Messages
157
  • Cast Sleep and Banish
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Sleep and Banish (Main Ability)
    • Actions
      • Set target = (Target unit of ability being cast)
      • Set point = (Position of target)
      • -------- - --------
      • Unit - Create 1 Dummy (Uncle) for (Triggering player) at point facing Default building facing degrees
      • Set dummy = (Last created unit)
      • Unit - Add a 0.50 second Generic expiration timer to dummy
      • Unit - Add Sleep (Dummy) to dummy
      • Unit - Order dummy to Undead Dreadlord - Sleep target
      • -------- - --------
      • Custom script: call RemoveLocation(udg_point)
Like I said before, you don't need a delay to make that trigger work. The Hero casts Banish, the Dummy casts Sleep.

But that's besides the point. Why are you still using a Dummy to cast Banish if you're using the Damage Detection System? The point of the DDS is to remove the need of having to do that.

1) Your Hero casts the Sleep ability applying the normal Sleep effects and Sleep buff. 2) The Damage Detection System detects when a unit with that sleep buff takes damage from a spell and multiplies the damage.

This is the only trigger you need along with your Sleep ability. Make sure the buffs match.
  • Sleep Bonus Damage
    • Events
      • Game - DamageModifierEvent becomes Equal to 1.00
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (DamageEventTarget has buff Sleep) Equal to True
          • IsDamageSpell Equal to True
        • Then - Actions
          • Set DamageEventAmount = (DamageEventAmount x 2.00)
        • Else - Actions
It's assumed that you want the ability to work this way. That is that the first Spell Damage dealt to the sleeping unit deals bonus damage and wakes it up. Because that's how it would function with Banish + Sleep. One thing to note is that this trigger doesn't take into consideration Magic damage.

I uploaded an example.
Thank you buddy, actually the problem was, that there was a bug when i was transfering the damage sistem, and only the variables were there, thats why it didnt worked xD
 
Status
Not open for further replies.
Top