• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Check for Spell shield in trigger?

Status
Not open for further replies.
Level 2
Joined
Mar 10, 2010
Messages
16
I have a problem with spell shield.. I have several spells that have a triggered part that deals damage. The problem is that when the target has a spell shield item ( blocks a spell every x seconds) The spell effect gets blocked but not the triggered part of the spell. I've tried to check if the unit has the spell shield buff but that does not seem to work since the unit itself does not have the buff but rather the item.

Anyone have a suggestion?
 
Yes. You can add the unit in a Unit Group, which constantly substracts an amount from a specified Integer variable, e.g. 60 (let's say that 60 is the cooldown of you Spell Shield spell) every 1.00 seconds (Time - Every 1.00 seconds of game-time) and, when it comes to 0, remove that unit from the Unit Group. So, you will create a fake timer. If you do it that way, you can instead use that check:
  • ((Triggering unit) is in Unit_Group) Equal to True
 
Level 2
Joined
Mar 10, 2010
Messages
16
Seems like I might have to rethink my idea here since I was thinking of having several different items with spell shield and different cooldowns. Looks like a lot of work to implement that functionality :cry:
 
Status
Not open for further replies.
Top