HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Game Cache

04-06-2006, 01:53 PM#1
Thunder_Eye
1. Hi, I was thinking if there is any way so I can check only player 1's gamecache on his harddrive when restoring his hero?

2. Or else when you retrieve data from a gamecache, what player will it retrieve it from? And is there anyway to change that player?

Hope you understand what I'm asking.
04-06-2006, 03:20 PM#2
Zoxc
Game Cache can't be saved or loaded in multiplayer so you're pretty much left with one player.
04-06-2006, 03:40 PM#3
Thunder_Eye
So when people is talking about its faster to use gamecaches, they only mean singleplayer?
04-06-2006, 03:52 PM#4
Earth-Fury
Quote:
Originally Posted by Thunder_Eye
So when people is talking about its faster to use gamecaches, they only mean singleplayer?

Game caches can be used as a method of storing data within a single excecution of a map, without saving it to a hard drive.

Think of it like a SQL table, or more accuratly, a hash table. It stores values that can easily be retrived. Using the game cache in this way allows for complex systems like vex's caster system.

Using advanced functions like H2I() and I2H() allow you to store referances to units within a game cache, where as normal variables would be unable to do this. This allows you to do really neat things, like attatching a value to a unit.

(I2H() and H2I() are user-made functions, abusing the return bug.)
04-06-2006, 03:55 PM#5
Thunder_Eye
Ok, too bad :/
04-06-2006, 03:58 PM#6
Earth-Fury
Quote:
Originally Posted by Thunder_Eye
Ok, too bad :/

If you wish to carry heros over from one map to another, try one of the many save / load code systems availible for download all around the place.
04-06-2006, 04:12 PM#7
Thunder_Eye
Yeah I know, I already have one. Just that I got a though that it would be neat to be able to save the data on the players computer, then he would only be able to load his character from his own comp which would prevent other people from stealing the hero.
04-06-2006, 04:16 PM#8
Earth-Fury
Quote:
Originally Posted by Thunder_Eye
Yeah I know, I already have one. Just that I got a though that it would be neat to be able to save the data on the players computer, then he would only be able to load his character from his own comp which would prevent other people from stealing the hero.

encode the players username into the password. This has only 3 faults:
- Spoofers
- Theres more then 1 realm, and not everyone has their nickname reserved on all realms.
- The player can only use that charicter on that account
04-06-2006, 04:27 PM#9
Thunder_Eye
Yeah but anyway It would be nice to get rid of the save code, you'll have to admit it would be easier to just type in "-load" instead of "-load xagasg-kjaslk-jdglas-jdglja-lsdgjl-asjgdl-kasjdg-dasgad-djslad" :)