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

Auto attack/Auto Ensnare

Status
Not open for further replies.
Level 3
Joined
May 12, 2008
Messages
42
Alright i made two buildings, both has shadow meld so they can go invisible but what i want is the arrow tower, it will auto attack units in range even when its in shadowmeld and my other tower it has ensnare i want it to auto ensnare units in range even if its in shadowmeld. Can someone explain how i can do such.:cry:
 
Level 2
Joined
Apr 8, 2009
Messages
21
Alright i made two buildings, both has shadow meld so they can go invisible but what i want is the arrow tower, it will auto attack units in range even when its in shadowmeld and my other tower it has ensnare i want it to auto ensnare units in range even if its in shadowmeld. Can someone explain how i can do such.:cry:

Can you show me the shadow meld spell triggers or code here?(if you have or you've used the spell)
 
Level 5
Joined
Nov 2, 2008
Messages
46
OK do this for ensnare:

  • Auto Ensnare
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set temp_Group2 = (Units in (Playable map area)((Unit-type of (Matching unit)) Equal to Wachturm))
      • Unit Group - Pick every unit in temp_Group2 and do (Actions)
        • Loop - Actions
          • Set temp_Loc = (Position of (Picked unit))
          • Set temp_Group = (Units within 500.00 of temp_Loc matching (((Owner of (Matching unit)) is an ally of (Owner of (Picked unit))) Equal to False))
          • Unit - Order (Picked unit) to Orc Raider - Ensnare (Random unit from temp_Group)
          • Custom script: call RemoveLocation(udg_temp_Loc)
          • Custom script: call DestroyGroup(udg_temp_Group)
      • Custom script: call DestroyGroup(udg_temp_Group2)
Replace the Wachturm (german for watch tower) with the unit you want to order. I hope this is the right thing for you.
 
Last edited:
Level 5
Joined
Nov 2, 2008
Messages
46
OK here is an example map
EDIT: You can fix shadowmeld attack like this:
  • Meld Attack
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set temp_Group2 = (Units in (Playable map area)((Level of Shadowmeld for (Matching unit)) Greater than or equal to 1))
      • Unit Group - Pick every unit in temp_Group2 and do (Actions)
        • Loop - Actions
          • Set temp_Loc = (Position of (Picked unit))
          • Set temp_Group = (Units within 500.00 of temp_Loc matching (((Owner of (Matching unit)) is an ally of (Owner of (Picked unit))) Equal to False))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Number of units in temp_Group) Greater than or equal to 1
            • Then - Actions
              • Unit - Order (Picked unit) to Right-Click (Random unit from temp_Group)
              • Custom script: call RemoveLocation(udg_temp_Loc)
              • Custom script: call DestroyGroup(udg_temp_Group)
            • Else - Actions
              • Custom script: call RemoveLocation(udg_temp_Loc)
              • Custom script: call DestroyGroup(udg_temp_Group)
      • Custom script: call DestroyGroup(udg_temp_Group2)
 

Attachments

  • AutoEnsnare.w3x
    12.5 KB · Views: 49
Last edited:
Level 3
Joined
May 12, 2008
Messages
42
Can you make a example map for auto unmeld to attack for me too please? Ill credit you for both triggers im just really new to triggering >.> also when i implented that to my map it dosnt work even after i replaced Watch Tower with my net trap tower
 
Level 3
Joined
May 12, 2008
Messages
42
Could you put the two triggers in my map i do but the functions dont work or something and triggers wont work
 

Attachments

  • Forest Combat.w3x
    45.9 KB · Views: 43
Level 3
Joined
May 12, 2008
Messages
42
Thank you so much!!

{EDIT}
Hey can you make it so they go back into shadowmeld after netting/attacking
 
Last edited by a moderator:
Status
Not open for further replies.
Top