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

[Solved] Restore a custom unit from cache

Status
Not open for further replies.
Level 1
Joined
Dec 10, 2013
Messages
2
Hello,

I'm trying to create a campaign. When I store a custom unit (hero) in the first map, I cannot restore it in the second one. Somewhere I read that the problem is with unit's ID but I have no idea how to fix it. Any ideas?

I'd be grateful for help!
 
Hello,

I'm trying to create a campaign. When I store a custom unit (hero) in the first map, I cannot restore it in the second one. Somewhere I read that the problem is with unit's ID but I have no idea how to fix it. Any ideas?

I'd be grateful for help!

Make sure the unit has the same ID as the original map. You can do this by copying the unit (CNTRL + C) in object editor and pasting it in the other map (CNTRL + V).

Alternatively you can download JNGP and specify the raw code directly.

Also, it could be an error in your triggers so maybe post those.
 
Level 14
Joined
Nov 17, 2010
Messages
1,266
I'm assuming that since you are using a game cache that you have a campaign. If that is the case then it should work as long as your unit is in the campaign editor. If you do not have a campaign and/or you created your unit using the object editor then it would only be available on one map. The campaign editor allows you to use the same units, abilities, items, doodads, etc for multiple maps as long as they are part of your campaign. The object editor only works for one map at a time.

Hopefully this is the extent of your problem, if not let me know and I'll see if we can figure it out.

Here is a tutorial on Game Caches if you need to make sure the triggers are done properly.
 
Level 1
Joined
Dec 10, 2013
Messages
2
Thank you very much for help!
The problem was that I didn't create the hero in campaign but only in object editor. I was thinking about it all the day and you solved it in a minute. :)
 
Status
Not open for further replies.
Top