• 🏆 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!
  • ✅ Time to vote for the top 3 models! The POLL for Hive's 6th HD Modeling Contest: Mechanical is now open! 📅 Poll close on July 16, 2024! 🔗 Cast your vote now!

Game cache problem!

Not open for further replies.
Level 4
Nov 15, 2004
I was trying to get a unit from one map to another with the level and items as they were when map1 is completed but my code doesn't work.
This is what i did:

in map1 i created a game cache from "Relic.w3v", then
-Game cache- restore "Selen"(the name of the unit) of map1 from last created game cache for player1.
-Set Selen(variable) as last restored unit
since its the first map no unit can be restored so i did:
-If(Selen not equal to no unit) then do (skip remaining actions) else do nothing.
-Set Selen as last created unit
-Create unit for Player 1(creates Selen for Player 1)

Since no unit will be restored because there was no game cache befor the if-clause will be false and new unit will be created wich later i tried to store it.

Near the end of the level i did:
-Create game cache from Relic.w3v
-Game cache-Store "Selen" as "Selen" of "map2" in last created game cache
-save last created game cache

In map 2 i did
-game cache create game cache of "Relic"
-game cache restore "Selen" of "map2" from last created game cache
-set Selen as last restored unit

I tested map1 and when i got to map2 no unit was restored.After i finish map1, map2 is loaded with
-set next level function.
Please help me how to solve this. thx
Not open for further replies.