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

Making a unit un-selectable

Status
Not open for further replies.
Level 14
Joined
Oct 16, 2010
Messages
762
Hi,

I'm looking for a way to make a unit un-selectable without adding Locust.

Here's the situation:

This unit is created at the start of a spell and dies after 8 seconds. The unit is a building and is basically a box that stops enemies from escaping it. Adding locust to it removed the pathing and allowed units to walk through it completely.
 
You can:

1- Make it a building with modified path rectriction with square form. I think there are default path models with square form. If the aren't, you can make your own.

2- Trigger the movement restriction by checking the distance of the unit and the center point, if it's too high, move the unit back.
 
Setting selection scale to -1 works for some models.

Then, if a unit right-clicks it, order them to move to the clicked location instead of Follow. If they select it, re-select their hero or something. That's the best I can think of.

Or trigger it with Pathing Blockers, and use Locust.
 
Here's the trigger:
  • Summon
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Water Elemental (Level 1)
    • Actions
      • Custom script: local unit udg_TempUnit
      • Set TempUnit = (Triggering unit)
      • Custom script: call UnitAddAbilityBJ( 'Aloc', udg_TempUnit )
      • Unit - Add Chaos Blank to TempUnit
      • Custom script: call UnitRemoveAbilityBJ( 'Aloc', udg_TempUnit )
      • Wait 0.00 seconds
      • Trigger - Turn off (This trigger)
      • Unit - Add Chaos Water Elemental to TempUnit
      • Trigger - Turn on (This trigger)
Looks like I failed to mention earlier that you need to use two Chaos abilities, since transforming the unit into itself doesn't give the desired results.
 

Attachments

Status
Not open for further replies.
Back
Top