• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Solved] Transition and Game Cache problems

Status
Not open for further replies.
Level 26
Joined
Oct 2, 2011
Messages
2,482
Please, gods of the trigger section, heed my call!
I have been ripping my hair over this for 4 hours now, and made little progress, but now I have stopped completely.

  • FCK THIS SHT
    • Events
      • Unit - A unit enters Transfer Region SS <gen>
    • Conditions
    • Actions
      • Set ClearedSubmap = 1
      • Game Cache - Store (Player 1 (Red) Current gold) as G of Integer in GameCache
      • Game Cache - Store (Player 1 (Red) Current lumber) as L of Integer in GameCache
      • Game Cache - Store CharHealthLevel as CHL of Integer in GameCache
      • Game Cache - Store CharDamage as CD of Real in GameCache
      • Game Cache - Save GameCache
      • Game - Display to (All players) the text: (String((Load G of Integer from GameCache)))
      • Game - Display to (All players) the text: (String((Load L of Integer from GameCache)))
      • Game - Display to (All players) the text: (String((Load CHL of Integer from GameCache)))
      • Game - Display to (All players) the text: (String((Load CD of Real from GameCache)))
      • Game Cache - Reload all game cache data from disk
      • Game - Display to (All players) the text: (String((Load G of Integer from GameCache)))
      • Game - Display to (All players) the text: (String((Load L of Integer from GameCache)))
      • Game - Display to (All players) the text: (String((Load CHL of Integer from GameCache)))
      • Game - Display to (All players) the text: (String((Load CD of Real from GameCache)))
      • Game - Display to (All players) the text: (String((Player 1 (Red) Current gold)))
      • Game - Display to (All players) the text: (String((Player 1 (Red) Current lumber)))
      • Game - Display to (All players) the text: (String(CharHealthLevel))
      • Game - Display to (All players) the text: (String(CharDamage))
      • Wait 5.00 seconds
      • Game - Save game as W\Q0.w3z and change level to WardenSS.w3x (Skip scores)
So in this trigger there are lots of "display text" functions. This is what I used to find what the hell was not working with my transition trigger.

If the values stored would have been stored correctly, the texts would have displayed that no?
But they don't! That is what I need help with. Why does the cache refuse to store those values?


Here is the campaign if you want to check the triggers yourself.
The transition is happening between in the two last maps in the map list of the campaign, "WardenC1" and "WardenSS".
 
Last edited:
Level 15
Joined
Mar 25, 2016
Messages
1,327
You did not create the game cache before using it. No trigger that creates it would run. Init was disabled and INITIATION did not run because of the condition. I enabled Init and it worked. So you should create the game cache and save the variable to it.
 
Level 26
Joined
Oct 2, 2011
Messages
2,482
Thanks a bunch man!

Could you help me out further? It seems like my brain have stopped working.
When I go back from the desert map (enter "qwe" as a chat string to do that), my stats from that map is not loaded. This time the data goes into the cache in the end of the desert map, but it does not reappear in the forest again?
Here is a smaller filesize version of the campaign: http://www.hiveworkshop.com/pastebin/184f6f012fa8e4d164af945d430a2ea99645/

EDIT: Never mind that!
My brain rebooted and realized I needed the "When a saved game is laoded instead of "map init"

Thank you again!
 
Status
Not open for further replies.
Top