• 🏆 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!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

[Trigger] Storing hero items in a campaign

Status
Not open for further replies.
Level 10
Joined
Sep 29, 2006
Messages
447
Here's the trigger I use:

I use
  • Game Cache - Create a game cache from MarioCampaign.w3v
  • Set GameCache = (Last created game cache)
  • Game Cache - Store Mario as Mario of Heroes in GameCache
to save him in the previous chapter and all variables were set appropriately.

  • load mario
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- Load Mario from previous Chapter --------
      • Game Cache - Create a game cache from MarioCampaign.w3v
      • Set GameCache = (Last created game cache)
      • Set TempPoint = (Center of MarioLoadZone <gen>)
      • Game Cache - Restore Mario of Heroes from GameCache for Player 1 (Red) at TempPoint facing 90.00
      • Set Mario = (Last restored unit)
      • Custom script: call RemoveLocation(udg_TempPoint)
      • If (Mario Not equal to No unit) then do (Skip remaining actions) else do (Do nothing)
      • -------- Create a Default Mario --------
      • Set TempPoint = (Center of MarioLoadZone <gen>)
      • Unit - Create 1 Mario for Player 1 (Red) at TempPoint facing Default building facing degrees
      • Set Mario = (Last created unit)
      • Hero - Set Mario Hero-level to 2, Hide level-up graphics
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Game - Display to (All players) the text: Default Mario Creat...
I have the create a default Mario in the event that someone wants to go back to the campaign and replay a level higher than level 1.
 
Last edited:
Level 6
Joined
May 7, 2009
Messages
228
What I meant was that you could test the GameCache by trying to store and load something other then a hero, for example, a simple integer. If it can't store that, the problem is probably that you are accidentally overwriting the gamecache or something, and not a problem with the individual hero.
 
Level 10
Joined
Sep 29, 2006
Messages
447
What I meant was that you could test the GameCache by trying to store and load something other then a hero, for example, a simple integer. If it can't store that, the problem is probably that you are accidentally overwriting the gamecache or something, and not a problem with the individual hero.

So I did this, and the integer isn't showing up. So what would I do If I am accidentally overwriting the game cache and how would I know if I am?
 
Status
Not open for further replies.
Top