HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Handles Timer & Gamecache Questions! Fun questions

02-08-2007, 03:10 AM#1
Mythic Fr0st
Ok, thanks for existing everyone, lol

Questions

1: Do I have to initiate a Game Cache before using it, and how do I do that if so
2: how do I store a unit in the game cache

3:
Quote:
Game Cache - Store (Last created unit) as unit of Category in Game_Cache

What does the part "Category" mean, do I change that?

4: How do I declare a global variable in JassCraft

I tried
Globals
udg unit array BackPack_Unit (local/global, then type, then array, then name, just like you do with locals)
Endglobals
02-08-2007, 03:35 AM#2
Alevice
1.
InitGameCache("randomname.w3v")
The name can be anything you want. It returns a gamecache handle, which you should store. That is set udg_GcVar = InitGameCache("myCache.w3v").

2. The trigger action you put in 3 does that. For Jass it would be call StoreUnit(gcVar,"category", "name", whichUnit)
3. Category is just any string you want to put. Let me put an example. You have 3 summoner, james, jake, and guillermo, and two Black Mages called shigeru and james. If you wanted to store them, you could do the following

Collapse JASS:
StoreUnit(gcVar,"Summoners", "James", udg_James)
StoreUnit(gcVar,"Summoners", "Jake", udg_Jake)
StoreUnit(gcVar,"Summoners", "Guillermo", udg_Guillermo)
StoreUnit(gcVar,"BlackMages", "Shigeru", udg_Shigeru)
StoreUnit(gcVar,"BlackMages", "James", udg_thatOtherJames)
02-08-2007, 03:36 AM#3
Ammorth
1) Game Cache - Create Game Cache from YourMap.wz3 (I think thats the extension)

2 + 3) Category is a string you can use (sort of like a folder on your desktop) so you can organize all your saved units. To save a unit, use the action you have quoted.

4)
Collapse JASS:
globals
    unit array udg_BackPack_Unit
endglobals

Edit:Ahh Alevice beat me to the first 3
02-08-2007, 03:40 AM#4
Mythic Fr0st
Thanks, guys