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

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 :-)
 
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.
Back
Top