HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Game Cache

09-19-2004, 07:30 AM#1
trigger_overlord
Ok...I can save stuff to a game cache...but how do i reload it? How do I load from a specific game cache?
09-19-2004, 08:10 AM#2
BABY_VAMPIRE
Your just gonna have to experiment a bit (I am having the same problem...).
09-20-2004, 01:39 AM#3
Rafael Br
Use "Game Cache - Create Game Cache", use the same name that you have used to create it.
09-20-2004, 05:22 AM#4
BABY_VAMPIRE
I figured out the first part of it too...
Variables:
Hero Unit -none-
PasswordPart String Array (6)
Trigger1:
Event:
Time elapsed is 2 sec (or Map Initaliaztion)
Condition:
(none)
Action:
Set Hero = (Last created unit)
Trigger 2:
Event:
Player 1 (red) types -save as an exact match
Condition:
(none)
Action:
Set Passwordparts[1] = (String((Hero experience of hero_of_player_1)))
Set Passwordparts[2] = (String((Player 1 (Red) Current gold)))
Set Passwordparts[3] = (String((Player 1 (Red) Current lumber)))
Set Passwordparts[4] = (String((X of (Center of (Playable map area)))))
Set Passwordparts[5] = (String((Y of (Center of (Playable map area)))))


Thats the first part, but you can find the rest if you go to Tutorials, then jass/triggers, then Save and Load Trigger. There is a great tutorial there.
09-21-2004, 06:58 PM#5
trigger_overlord
Won't that delete the previous Game Cache?
09-21-2004, 06:59 PM#6
trigger_overlord
Quote:
Originally Posted by BABY_VAMPIRE
I figured out the first part of it too...
Variables:
Hero Unit -none-
PasswordPart String Array (6)
Trigger1:
Event:
Time elapsed is 2 sec (or Map Initaliaztion)
Condition:
(none)
Action:
Set Hero = (Last created unit)
Trigger 2:
Event:
Player 1 (red) types -save as an exact match
Condition:
(none)
Action:
Set Passwordparts[1] = (String((Hero experience of hero_of_player_1)))
Set Passwordparts[2] = (String((Player 1 (Red) Current gold)))
Set Passwordparts[3] = (String((Player 1 (Red) Current lumber)))
Set Passwordparts[4] = (String((X of (Center of (Playable map area)))))
Set Passwordparts[5] = (String((Y of (Center of (Playable map area)))))


Thats the first part, but you can find the rest if you go to Tutorials, then jass/triggers, then Save and Load Trigger. There is a great tutorial there.
------------------
WTF THIS IS GAME CACHE NOT SAVE AND LOAD I HAVE ALREADY GOT A SAVE LOAD IF I WANT IT!
09-21-2004, 07:02 PM#7
BuRnInSpartan
Quote:
Originally Posted by BABY_VAMPIRE
Your just gonna have to experiment a bit (I am having the same problem...).

dude quit with the spam! no one wants to know that your having problems! he can figure it out by himself! no shit he has to expirement please stop with the spam
09-21-2004, 07:03 PM#8
trigger_overlord
sry didnt mean to spam
09-21-2004, 07:38 PM#9
BuRnInSpartan
not you dude baby vamprie he's been spaming in my threads a lot and it's just getting annoying
09-22-2004, 04:42 AM#10
Rafael Br
Quote:
Originally Posted by aidan_124
Won't that delete the previous Game Cache?
If you take a look at the "Create Game Cache" action, you will see "If the file does not exist it will be created", so, you are puting the name of a file that alredy exist, it will only load it.To load a unit, use game cache - Restore unit facing angle(or point), to use a integer, real, string or boolean, use the Game Cache - Load String(or integer, real, boolean) function, like this:
Set YourVar = (Load YourLabel of YourCategory from (Last created game cache))
The create game cache action, with the same name that you have saved, is only used to load a game cache in another map, if you alredy created a game cache and set it into a variable, just use that game cache.