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

Making a unit un-selectable

Status
Not open for further replies.
Level 13
Joined
Oct 16, 2010
Messages
731
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.
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
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.
 

EdgeOfChaos

E

EdgeOfChaos

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.
 
Level 25
Joined
Jul 10, 2006
Messages
3,315
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

  • UnselectableSummon.w3x
    16.4 KB · Views: 66
Status
Not open for further replies.
Top