HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

How do I store gold from map to map?

09-04-2002, 10:34 PM#1
Sardius
I tried it with a game cache... at the end of the map I have a "save player1's current gold" as a game cache interger... and in the next map the it restores my hero... I can't find a trigger to restore the gold... I have 0 gold in the next map
09-04-2002, 10:47 PM#2
Guest
instead of saving gold or lumber directly to the cache, use an integer variable as temporary storage.

Saving to cache:
Set GoldCache = (Player 1 (Red) Current gold)
the write (integer) GoldCache to the cache

Recovering from Cache:
Read GoldCache from the cache
Player - Set Player 1 (Red) Current gold to GoldCache

I'm sure you get the idea from these fragments. Good Luck.