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

[Spell] Unselactable Vulnerable Targetable Unit

Status
Not open for further replies.
Level 3
Joined
May 10, 2014
Messages
41
Hello!

I trying to make a spell that makes target enemy unit unselectable - to forbid enemy player to control him, and then give him an order to attack his own ally units or other order by trigger. It's something like 'Hypnosis'.

I try to give unit 'locust' ability, but it makes him invulnerable, the next problem is collision.
I also tried remove unit from player selection, but it's not fast enough, so enemy still can control unit (i mean human, not AI), and periodic timer bugs the game (with other triggers working at the same time).

Replacing unit with copy or something like that isn't possible, i think, because spell can be used on every unit on map.

Can somebody give me any ideas?
Or may be, someone know how to make it?

Anyway, Thanks for any information :as:
 
You can register units to a system that controls an event unit is selected. When the spell begins the units will be unselectable as the event goes off you force player to de-select that unit.
When the spell ends remove the registered unit from the system.
To prevent lag and bugs you need to delete the event. Since you can only do that by removing triggers you must create a trigger for each unit registered then delete the trigger when that unit is removed from the system.
 
Status
Not open for further replies.
Top