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

Creating a Semi Cloak

Status
Not open for further replies.
Level 5
Joined
Dec 13, 2008
Messages
141
Alright, I want to have a unit be invisible when he is not attacking(Like the Zealot upgrade in Pobes vs Zealot and Rikimaru from DotA)

I thought a requirement would do the trick but it didn't work(All I did in the requirement was Field Semi Cloak Not Attacking
: Requirement + (!CountAbil(attack,QueuedOnlyAtUnit)|(None))
)

Some insight would be nice.

EDIT: I think I may have figured out but not sure. Would it be a Validator?
 
Last edited:
Level 5
Joined
Dec 13, 2008
Messages
141
Ok, I gave the Invisibility behavior the NotAttacking Validator and a requirement with the same event, except I changed QueuedOnlyAtUnit to CompletedOnlyAtUnit and it isn't de-cloaking the unit when he is attacking.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,223
Well here is one way which should work.

Unit starts out permanently cloaked.
Unit has permanent Behaviour
Behaviour fires an effect when owner deals damage.
Effect adds Behaviour2 to the damag source unit.
Behaviour2 turns off cloaking and lasts a few seconds before expiring.

Advantage is that it allows you to make the unit remain uncloaked for a while after attacking. Disadvantage is only once the unit deals damage does he uncloak meaning that the entire animation stage of attacking his first attack he remains cloaked.
 
Status
Not open for further replies.
Top