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

[Spell] Invisible Air unit/hero unable to fly above trees with Wind Walk

Status
Not open for further replies.
Level 11
Joined
Sep 11, 2013
Messages
327
Greetings!
I have this weird problem with Wind Walk item.. If A flying unit/hero uses that Wind Walk item, becomes unable to fly above trees.
(I have only 2 flying units in the map) 1 hero / 1 unit.
I know that i can solve the problem with "Invisibility" spell, but here is 2 new problems and i don't know how to solve them..
1.The "Invisiblity" spell doesn't have "backstab damage" and "movement speed increase in %" and i need them.
2.I want the Invisibility spell to be activated when i press the spell, like wind walk. Right now i need to press the spell, then press my hero in order to be activated..
If anyone can help me, the help will be appreciated!
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,557
You want to order a Dummy unit to cast Invisibility on your Hero. The ability the Hero casts can remain as Wind Walk with a 0.01 second duration or any non-Targeting ability since you said it's coming from an Item and Item abilities are always Instant.

This would be done using a trigger like this:
  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Wind Walk (Item)
  • Actions
    • Create Dummy unit, Add short Expiration Timer to Dummy unit, Add Invisibility to Dummy unit, Order Dummy to cast Invisibility on (Triggering unit)
Then you would create some triggers to detect the breaking of Wind Walk:
1) When your Hero casts another spell -> Remove Invisibility buff
2) When your Hero deals attack damage -> Remove Invisibility buff + add backstab damage

#1 Is pretty straight forward, you just use the Starts the effect of an ability Event and the Remove specific buff Action.
#2 can be done with a Damage Engine or on more recent versions using the GUI Event -> A unit Takes damage.

Here's an example of #2:

The movement speed buff could come from another spell like Bloodlust which could be applied using the same Dummy method. The problem here is that you'll end up with 2 buffs and there could be issues with Dispel effects / Control Magic, but that's hard to avoid.
 
Last edited:
Level 11
Joined
Sep 11, 2013
Messages
327
Then you would create some triggers to detect the breaking of Wind Walk:
1) When your Hero casts another spell -> Remove Invisibility buff
2) When your Hero deals attack damage -> Remove Invisibility buff + add backstab damage

#1 Is pretty straight forward, you just use the Starts the effect of an ability Event and the Remove specific buff Action.
#2 can be done with a Damage Engine or on more recent versions using the GUI Event -> A unit Takes damage.

Here's an example of #2:
1) The hero will lose invisibility spell without "triggers" when i cast/attack something, so i don't understand why i should to trigger this.
2) I don't understand how to made this with A unit Takes damage...

Here is what i tried..
  • Wind Walk
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Item Wind Walk - SHOP 2020
    • Actions
      • Game - Display to (All players) the text: TEST
      • Set VariableSet TempLoc4 = (Position of (Triggering unit))
      • Unit - Create 1 Wisp Wind Walk Dummy for (Owner of (Triggering unit)) at TempLoc4 facing Default building facing degrees
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Unit - Add xxxxxx Invisibility to (Last created unit)
      • Unit - Order (Last created unit) to Human Sorceress - Invisibility (Triggering unit)
      • Custom script: call RemoveLocation(udg_TempLoc4)
  • Backstab
    • Events
      • Unit - A unit Takes damage
    • Conditions
      • ((Damage source) has an item of type Mist of Shadows) Equal to True
      • ((Damage source) has buff Invisibility X) Equal to True
    • Actions
      • Event Response - Set Damage of Unit Damaged Event to ((Damage taken) + 1785.00)
The first trigger seems to work, but the second, do not work..
If i delete that condition with "buff" = true, the owner of the item will give permanently + 1785 damage to anyone..
My mind doesn't help me much with programming..
Thanks for help!
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,557
Sorry, I forgot how Invisibility worked.

I assume the Backstab trigger doesn't work because that Event fires AFTER the Invisibility buff has already been removed, therefore the Conditions always fail. Is there an option on Invisibility to make it remain active even after attacking? If so, you could enable that and then manually Remove the buff like I originally suggested.

Otherwise, I think you'll need to use either a Hashtable or Unit Indexer to track the Invisibility on the Hero. Or maybe it'd be better to Add a hidden Permanent Invisibility to the Hero and then Remove it after X seconds and/or when they Attack/Cast a spell.
 
Level 25
Joined
Sep 26, 2009
Messages
2,379
You could use a hidden Critical Strike ability with 100% chance to proc to imitate the bonus damage from wind walk.
Basically when you cast Invisibility, add the hidden Critical Strike to the hero and then via trigger remove the hidden ability whenever any unit took damage from your invisible hero while he has that hidden ability
 
Level 11
Joined
Sep 11, 2013
Messages
327
I assume the Backstab trigger doesn't work because that Event fires AFTER the Invisibility buff has already been removed, therefore the Conditions always fail. Is there an option on Invisibility to make it remain active even after attacking? If so, you could enable that and then manually Remove the buff like I originally suggested.

Otherwise, I think you'll need to use either a Hashtable or Unit Indexer to track the Invisibility on the Hero. Or maybe it'd be better to Add a hidden Permanent Invisibility to the Hero and then Remove it after X seconds and/or when they Attack/Cast a spell.
The is not such option on the spell.. I never used hashtables, is way to complicated for me.. At least, now i am able to fly above trees with invisible units with that dummy trigger. :) Thanks!
You could use a hidden Critical Strike ability with 100% chance to proc to imitate the bonus damage from wind walk.
Basically when you cast Invisibility, add the hidden Critical Strike to the hero and then via trigger remove the hidden ability whenever any unit took damage from your invisible hero while he has that hidden ability
It seems to be a good idea, i'll try! Thanks!

EDIT:
  • Wind Walk
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Item Wind Walk - SHOP 2020
    • Actions
      • Game - Display to (All players) the text: TEST
      • Unit - Add Critical Strike X to (Triggering unit)
      • Set VariableSet TempLoc4 = (Position of (Triggering unit))
      • Unit - Create 1 Wisp Wind Walk Dummy for (Owner of (Triggering unit)) at TempLoc4 facing Default building facing degrees
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Unit - Add xxxxxx Invisibility to (Last created unit)
      • Unit - Order (Last created unit) to Human Sorceress - Invisibility (Triggering unit)
      • Custom script: call RemoveLocation(udg_TempLoc4)
  • Backstab Copy
    • Events
      • Unit - A unit Takes damage
    • Conditions
      • ((Damage source) has an item of type Mist of Shadows) Equal to True
    • Actions
      • Unit - Remove Critical Strike X from (Damage source)
      • -------- 123 --------
      • Floating Text - Create floating text that reads |cffff00001785!|r above (Damage source) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
      • Floating Text - Change (Last created floating text): Disable permanence
      • Floating Text - Change the lifespan of (Last created floating text) to 1.50 seconds
      • Floating Text - Change the fading age of (Last created floating text) to 0.75 seconds
I did that, but i have some little problems..
If the hero use item and don't hit anyone and the buff "invisibility" disappear, it will still gives bonus damage to the next attack.
The Floating Text will appear over and over again on each hit and i don't know how to solve that..
 
Last edited:
Level 39
Joined
Feb 27, 2007
Messages
5,019
The Floating Text will appear over and over again on each hit and i don't know how to solve that..
Add an additional condition:
  • (Level of Critical Strike X for (Damage source)) not equal to 0
If the hero use item and don't hit anyone and the buff "invisibility" disappear, it will still gives bonus damage to the next attack.
You will have to start a timer to remove the ability when the buff has expired/been removed.
 
Last edited:
Status
Not open for further replies.
Top