• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

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.
 
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.
 
polardude; I really like your approach, thank you, it was exactly the solution I've been looking for :)
 
Status
Not open for further replies.
Back
Top