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

Mass Invisibility Aura help needed Please!

Status
Not open for further replies.
Level 1
Joined
Nov 8, 2007
Messages
3
So I'm trying to create an aura that renders friendlies invisible while in range.

I've been having trouble doing so though. Tried a couple different variations and I've been to thehelper.net/forums but I'm not getting any response now. So maybe one of yall can help!

The trigger coding is as follows:


Band of Thieves
Events
Unit - A unit Learns a skill
Conditions
(Learned Hero Skill) Equal to Band of Thieves
Actions
Unit Group - Pick every unit in (Units within 512.00 of (Position of (Learning Hero))) and do (Unit - For (Matching unit) set ability state to Permanent for ability Band of Thieves )
 
that will only work once and for when you learn the skill, you will have to make that trigger turn on another trigger that will have a periodic event that will check when they are in range then to add invisiblity and when they arent in range then removing invisibility or just never giving them it at all but of course removing the group after to prevent leaks.
 
Level 1
Joined
Nov 8, 2007
Messages
3
So something like:

Event
unit learns a skill

Condition
learned skill = MassInvisibility

Action
Turn (ConstantCheckTrig) = ON
(and then the destroy part)

?

Something like that?


So then the ConstantCheck trigger would be something like:

Action
IF Unit within range X
add permanent ability
ELSE
remove ability


?
 
Last edited:
Level 11
Joined
Aug 25, 2006
Messages
971
Every X seconds -
If unit has BUFF add INVISIBILITY
else remove ability INVISIBILITY


Pretty much it, unless you want to check if the unit has INVISIBILITy before you attempt to remove it. Also remember, all groups leak, your going to have to null out the group at the end of the periodic timer.
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
  • Invisible
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ***(Level of <invisibility aura> for (Picked unit)) Greater than 0***
              • ((Picked unit) has buff <Buff of invisibility aura>) Equal to True
            • Then - Actions
              • Unit - Add <permanent invisibility> to (Picked unit)
            • Else - Actions
              • Unit - Remove <permanent invisibility> from (Picked unit)
Umm that ***(Level of <invisibility aura> for (Picked unit)) Greater than 0*** condition makes aura sharer dont get invisibility Adding or not adding is your decision

LEAK REMOVED VERSION

  • Invisible
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • Set TempGroup = Units in (Playable map area)
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ***(Level of <invisibility aura> for (Picked unit)) Greater than 0***
              • ((Picked unit) has buff <Buff of invisibility aura>) Equal to True
            • Then - Actions
              • Unit - Add <permanent invisibility> to (Picked unit)
            • Else - Actions
              • Unit - Remove <permanent invisibility> from (Picked unit)
      • Custom script: call DestroyGroup(udg_TempGroup)
      • Custom script: set udg_TempGroup = null

PS : Nulling is not required
Reason : You set the variable to something else already, nulling needed if you don't use that variable anymore
 
Status
Not open for further replies.
Top