• 💀 Happy Halloween! 💀 It's time to vote for the best terrain! Check out the entries to Hive's HD Terrain Contest #2 - Vampire Folklore.❗️Poll closes on November 14, 2023. 🔗Click here to cast your vote!
  • 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 HD Level Design Contest #1 is OPEN! Contestants must create a maze with at least one entry point, and at least one exit point. The map should be made in HD mode, and should not be openable in SD. Only custom models from Hive's HD model and texture sections are allowed. The only exceptions are DNC models and omnilights. This is mainly a visual and design oriented contest, not technical. The UI and video walkthrough rules are there to give everyone an equal shot at victory by standardizing how viewers see the terrain. 🔗Click here to enter!

[JASS] Game Cache

Status
Not open for further replies.
Level 8
Joined
Jul 28, 2008
Messages
211
Hi!

I want to know how can i get a stored unit with jass.

I tried reading a few tutorials but all i saw was :

Now, storing and getting units is a pain in the ass, and everything else than boolean, string, integer and real is nearly impossible, or very annoying to do all the time, to do without a system.

I've heard about local handle vars and structs, but I want to know how to do it without any of those.

Thx!
 
Level 16
Joined
Mar 3, 2006
Messages
1,564
JASS:
native InitGameCache takes string campaignFile returns gamecache
this is similar to
  • Game Cache - Create a game cache from MapName.w3v
but not the same as the JASS one is native and the trigger one is BJ, which calls the native one.
---
native StoreBoolean takes gamecache cache, string missionKey, string key, boolean value returns nothing Stores Boolean
native RestoreUnit takes gamecache cache, string missionKey, string key, player forWhichPlayer, real x, real y, real facing returns unit Restors unit from a cache.
native ReloadGameCachesFromDisk takes nothing returns boolean in triggers
  • Game Cache - Reload all game cache data from disk
<< ADDED >>
JASS:
native FlushGameCache takes gamecache cache returns nothing
similar to
  • Game Cache - Clear (Last created game cache)
 
Status
Not open for further replies.
Top