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

[Trigger] Save/Load Unit HandleID

Status
Not open for further replies.
Level 11
Joined
Nov 15, 2007
Messages
800
  • Actions
    • Unit - Create 1 Footman for Player 1 (Red) at loc facing 90.00 degrees
    • Set unit = (Last created unit)
    • Set unit2 = Circle of Power 0001 <gen>
    • Custom script: set udg_int = GetHandleId(udg_unit)
    • Custom script: set udg_int2 = GetHandleId(udg_unit2)
    • Hashtable - Save int2 as 1 of int in Table
    • Hashtable - Save int as 1 of int2 in Table

  • Actions
    • Set unit = (Triggering unit)
    • Custom script: set udg_int = GetHandleId(udg_unit)
    • Set unit2 = (Load 1 of int in Table)
    • Custom script: set udg_int2 = GetHandleId(udg_unit2)
    • Game - Display to (All players) for 5.00 seconds the text: (String(int))
    • Game - Display to (All players) for 5.00 seconds the text: (String(int2))
When I save/load the second unit's HandleID in this manner it returns 0. What am I fucking up and how do I do it right?
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
I remember a time when "GetHandleId()" and saving it, wasn't working, but "SaveUnitHandle()" did work. I guess it should be the same, but, somehow, one works, the other doesn't.
 
Status
Not open for further replies.
Top