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

[Trigger] "Shadowmeld"

Status
Not open for further replies.
Level 3
Joined
Sep 24, 2007
Messages
64
I'm hung up on a shadowmeld spell.
I've browsed the forums a bit for a solution or alternate system but I didn't find anything :F

What I am trying to do is a shadowmeld that works daytime, and if I'm not totally off the only way to do this is by triggers. (?)
The simple(?) code follows
  • Events:
  • Time - Every 0.1 seconds of game time.
  • Conditions:
  • Actions:
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions:
        • (Distance between StoredPosition and (Position of unit)) Equal to 0.00
      • Then - Actions
        • Set Counter = (Counter + 1)
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions:
            • ActiveBoolean Equal to False
            • Counter Greater than or Equal to 70
          • Then - Actions:
            • Unit - Add Permanent Invisibility to Huntress
            • Set ActiveBoolean = True
          • Else - Actions:
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions):
              • If - Conditions
                • Counter Less than 70
              • Then - Actions
                • Unit - Remove Permanent Invisibility from unit
                • Set ActiveBoolean = False
              • Else - Actions
                • Do nothing
      • Else - Actions
        • Set Counter = 0;
  • Set StoredPosition = (Position of unit)
I am also quite sure you'd all solve this entirely differently and this is all stupid but I can't see why it shouldn't work!
Currently, if you stand at a position long enough and then move you will not lose invisibility until you stop moving.(!)

Help very much appreciated.
 
Level 3
Joined
Sep 24, 2007
Messages
64
Hm... That could work, but I think I'd prefer something like this. For some reason I've been avoiding channeling spells
Atm there is no real "ability" (which could trigger the channel), just a passive camoflague sync (kind of).

The main reason for posting this is getting rid of this frustration caused by something that seems so definite to work failing >_>
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
You could use this to remove the ability:

  • Remove Shadowmeld
    • Events
      • Unit - A unit Is issued an order targeting an object
      • Unit - A unit Is issued an order targeting a point
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (Issued order) Not equal to (Order(stop))
      • (Issued order) Not equal to (Order(holdposition))
    • Actions
      • Unit - Remove Permanent Invisibility from YourUnit
You may also need to add the unit condition.
 
Level 3
Joined
Sep 24, 2007
Messages
64
@DarkAngelAzazel

omg! How incredibly stupid! xD
Cheers! +rep

Yes, it does remove it.

Orly? You mean that auto attack is a "no target" event?
If that is the case then it'd be a better solution! But I've tried this before with other stuff and it did not work.
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
Orly? You mean that auto attack is a "no target" event?
If that is the case then it'd be a better solution! But I've tried this before with other stuff and it did not work.

Yeah, I tested it by letting a hero to Shadowmeld with your trigger, the spawning an enemy near it. The hero auto-attacked and came out of Shadowmeld, triggered by my trigger. I think that auto-attack and user issued attack call the same function in the end.
 
Status
Not open for further replies.
Top