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

Cannot Restore Unit in Campaign

Status
Not open for further replies.
Level 16
Joined
Mar 27, 2011
Messages
1,349
My first campaign attempt. (For now) I'm simply trying to restore my saved unit into my second map.

Here is my project if anyone can take a look. I don't want to post triggers because it won't help. I've asked the same question in the past and nobody could figure out the problem based on my triggers and nobody bothered to help when I did post my map :(

The relevant triggers are:
1.) Map Initialization trigger
2.) Init Variables trigger.
3.) Store Game Cache trigger (inside Change Maps folder)


I know my coding is a bit all over the place and messy, but if anyone could take a look I'd greatly appreciated it.
 
Last edited:
Level 16
Joined
Mar 27, 2011
Messages
1,349
The type of the unit you try to restore has to be present in the next map, too. You probably copied it but it did not receive the same id (>View >Display values as raw data). You should rather use the campaign's object editor for objects that need to be in common.

Wow. It worked. You won't believe how many hours I've spent trying to figure this out...Not a single tutorial mentioned editing the units within the campaign editor and I didn't think of it. Nobody mentioned it last time I wrote a thread about it either :( I even abandoned this whole project for a while because I was getting the shits big time, lol.

Heh...Thanks for helping. It'll be a pain replacing units on the map with functional copies but at least I'll be moving forward with my project again :)
 
Status
Not open for further replies.
Top