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

Unselectable unit (not via Locust)

Status
Not open for further replies.
Level 4
Joined
Feb 4, 2014
Messages
50
Hello,
I need to make a unit unselectable in-game without using Locust ability.
(Locust ability makes it impossible for the Event: a unit comes withing range to function correctly)

I appreciate your help.
 
Level 11
Joined
Nov 13, 2010
Messages
210
first you make the unit you need and place it where you need and make it owned by Neutral Passive then make a varibles with (unit Group) then you make a trigger with action unit group add unit then add the unit you set on the map to the (unit Group) you made in varibles
then you made a new action in the same trigger
Unit Group - Pick every unit in (Units owned by Neutral Passive) and do (Actions)
Loop - Actions
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Picked unit) Equal to (==) Name of the unit you made <gen>
Then - Actions
Trigger - Add to <gen> the event (Unit - A unit comes within xx.xx of (Picked unit))
Unit - Add Locust to (Picked unit)
Else - Actions
btw on event you can add Map initialization

then you make a new trigger
Group - Pick every unit in (unit Group) you made and do (Actions)
Loop - Actions
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Distance between (Position of (Triggering unit)) and (Position of (Picked unit))) Less than or equal to (<=) xx.xx
Then - Actions
then you can do what ever Actions you like there come
Else - Actions
on event on this you add nonthinking.
 
Level 4
Joined
Feb 4, 2014
Messages
50
polardude; I really like your approach, thank you, it was exactly the solution I've been looking for :)
 
Status
Not open for further replies.
Top