• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

How to create a non-selectable summon that follows you?

Status
Not open for further replies.
Level 2
Joined
Jan 5, 2013
Messages
8
I know this is possible because in the Warcraft custom map Defense of the Shrines (A DotA rip-off using Touhou characters), a hero, Youmu Konpaku, has her ghost-self follow her around whenever she casts that summon ability. It cannot be selected but it follows her around as well as attack whenever a unit is close.

Is it using a 'Follow Unit' trigger or is there something more?
 
Add an ability called "Locust" to that unit.
The ability in hexadecimal form is 'Aloc', here's how you add the ability to the summoned unit (assuming you "create" the unit via trigger);
  • Summon
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Summon
    • Actions
      • Set TempLoc = (Position of (Triggering unit))
      • Unit - Create 1 Summon for (Triggering player) at TempLoc facing Default building facing degrees
      • Set SummonUnit = (Last created unit)
      • Custom script: call UnitAddAbility(udg_SummonUnit, 'Aloc')
      • Custom script: call RemoveLocation(udg_TempLoc)
This will make your unit to be unselectable.

You can also add this ability via Object Editor.

For the trigger to follow the unit, perhaps it uses interval or one-time follow order, it must have some algorithm of an AI, you need to create it (trigger it) to behave like human-owned unit.
 
I had a trigger doing this in one of my maps.

I have a wolf unit that has a spell creating 7 transparent illusions of itself (same unit but with locust ability and changed transparency).
Upon creation, all I did was order it to right click the main wolf unit (I have a feeling follow will work the same).
Now they will follow you everywhere, and target whatever the main wolf attacks via right clicks, else it attacks random (only if main wolf is attacking also).
 
Are you correcting me or adding additional information ?
I'm confused =,="
Correcting you :P.
'Aloc' isn't hexadecimal, it's ASCII. Hexa is limited to 0-9 and A-F (16 characters), while ASCII has 256 different characters.
(In hexa, "a" and "A" are both 10, but in ASCII "a" is 97 and "A" is 65).
 
Last edited:
Status
Not open for further replies.
Back
Top