Cant remove invis, help please.

tiennen07

New Member
Reaction score
1
Ok, I've been working on a unit passive ability for a mod off of the strategy game my friends and i are working on. The passive ability is supposed to stealth the unit in question (Drenai Merry Man) when around the trees of his home country, but remove the stealth when not around the trees. Heres the trigger I have for the stealth part, but i can't seem to figure out a trigger for removing the stealth.

Treewalk
Events
Time - Every 0.40 seconds of game time
Conditions
Actions
Set TempDestructible = (Destructible-type of Summer Tree Wall 0263 <gen>)
Set TempGroup = (Units of type Drenai Merry Man)
Unit Group - Pick every unit in TempGroup and do (Actions)
Loop - Actions
Set TempLoc = (Position of (Picked unit))
Destructible - Pick every destructible within 256.00 of TempLoc and do (Actions)
Loop - Actions
If ((Destructible-type of (Picked destructible)) Equal to TempDestructible) then do (Set TempBoolean = True) else do (Do nothing)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
TempBoolean Equal to True
Then - Actions
Unit - Add Permanent Invisibility to (Picked unit)
Else - Actions
 

Kikac_NNGK

Well-Known Member
Reaction score
33
i'll try to solve the problem

EDIT: Can u settle the codes in Code tags
Code:
 [/CODE ] or in wc3 tags? [WC3] [/WC3 ]
 

tiennen07

New Member
Reaction score
1
I'm sorry, i just picked up map editing like two days ago, so i'm pretty mcuh completely new to this.
 

Kikac_NNGK

Well-Known Member
Reaction score
33
the WC3 tags are codes that shows u the triggers in perfect edition.
Just go in trigger editor and in the name of the trigger where are the functions of the triggers (Event, Condition, Actions), Right-click on the name and go Copy as Text. Then while u r posting quick reply or new thread just press the "a" alphabet and Ctrl+V between the [ wc3 ] and [ /wc3 ] code
Here r a few s-shots:
 

tiennen07

New Member
Reaction score
1
Trigger:
  • Treewalk
    • Events
      • Time - Every 0.30 seconds of game time
    • Conditions
    • Actions
      • Set TempDestructible = (Destructible-type of Summer Tree Wall 0263 &lt;gen&gt;)
      • Set TempGroup = (Units of type Drenai Merry Man)
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • Set TempLoc = (Position of (Picked unit))
          • Destructible - Pick every destructible within 256.00 of TempLoc and do (Actions)
            • Loop - Actions
              • If ((Destructible-type of (Picked destructible)) Equal to TempDestructible) then do (Set TempBoolean = True) else do (Do nothing)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • TempBoolean Equal to True
                • Then - Actions
                  • Unit - Add Permanent Invisibility to (Picked unit)
                • Else - Actions
 

Kikac_NNGK

Well-Known Member
Reaction score
33
Try this
Trigger:
  • Trigger
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Learned Hero Skill) Equal to *Your Skill*
          • (Unit-type of (Triggering unit)) Equal to Drenai Merry Man
    • Actions
      • Set TempDestructible = (Destructible-type of (Summer Tree Wall 0263 &lt;gen&gt;))
      • Destructible - Pick every destructible within 300.00 of (Position of (Triggering unit)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Destructible-type of (Picked destructible)) Equal to TempDestructible
            • Then - Actions
              • Unit - Add Permanent Invisibility to (Triggering unit)
            • Else - Actions
 

tiennen07

New Member
Reaction score
1
Try this
Trigger:
  • Trigger
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Learned Hero Skill) Equal to *Your Skill*
          • (Unit-type of (Triggering unit)) Equal to Drenai Merry Man
    • Actions
      • Set TempDestructible = (Destructible-type of (Summer Tree Wall 0263 &lt;gen&gt;))
      • Destructible - Pick every destructible within 300.00 of (Position of (Triggering unit)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Destructible-type of (Picked destructible)) Equal to TempDestructible
            • Then - Actions
              • Unit - Add Permanent Invisibility to (Triggering unit)
            • Else - Actions

this would add permanent invisibility to the unit though, what is needed is a trigger that would remove permanent invisibility from the picked unit.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top