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

A little Jass function help

Status
Not open for further replies.
Well i'm not that good using jass yet and need to do 2 things i've so far found no way of doing on my own.

1: I need a way to "connect" two units two each other, an example would be if the "airport" dies, the currently docked copter would die two, and as long as a copter is docked, anouther copter can't land and dock inside it.

The second is how to disable usercontrol of a single unit, so that is still able to perform orders, just can't be ordered by anyone, but through my triggers. Tried to make it neutral passive and use the follow through time function on the channel spell, but neither worked.

I'll reward any help with rep ofcause :)
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
Initialize a hashtable, for example
JASS:
hashtable hash = InitHashtable()

Link the units:
JASS:
call SaveUnitHandle(hash, GetHandleId(u1), StringHash("target"), u2)
^You save unit u2 for unit u1 in hash as target.

Then you can load the target:

JASS:
set u3 = LoadUnitHandle(hash, GetHandleId(*some_unit*),StringHash("target"))
 
Status
Not open for further replies.
Top