game cache

D

darkmaster24

Guest
im currently making a campaign but im having a problem. im not sure how to save a hero from the first map and load it a the start of the next map. i thought it was to do with using the game cache but it isnt working. ive read whats on the torturial site but it didnt really help.

map 1 save trigger

Events
Unit - A unit enters finish <gen>
Conditions
(Owner of (Triggering unit)) Equal to Player 1 (Red)
Actions
Game Cache - Create a game cache from illidan.w3v
Game Cache - Store Illidan (Demon Form) 0001 <gen> as illidan of hero in (Last created game cache)
Game Cache - Save (Last created game cache)
Game - Set the next level to illidan camp part 2.w3m
Game - Show custom campaign button 2
Game - Victory Player 1 (Red) (Show dialogs, Skip scores)


map 2 load trigger

Events
Map initialization

Actions
Game Cache - Restore illidan of hero from (Last created game cache) for Player 1 (Red) at (Center of start <gen>) facing 270.00


can anyone help please?
 
darkmaster24 said:
Actions
Game Cache - Restore illidan of hero from (Last created game cache) for Player 1 (Red) at (Center of start <gen>) facing 270.00

I'm not exactly sure, but I think this action is the source of your problem. The "Last created game cache" is giving you the problem. Instead of that, type in the name of the game cache you stored your hero to. I think you named it illidan.wcv. So now this should be your revised action for loading the cache:

Code:
Actions
Game Cache- Restore illidan of hero from illidan.wcv for Player 1 (Red) at Center of start <gen> facing 270.00
Try this and see if this solves the problem. Best wishes!
-Ghoulfrenzy
 
Don't use last created game cache...make a variable of type game cache and specify that one.... and that should fix it :D
 
ghoul, it doesnt let me type in the box

krakka, ive made one of game cache but i dont know how to make it represent the cache (it doesnt let me edit the value)
 
Hey, thats what I told him? Or did I? Hehehe. Krakka, you stop stealing my glory. Hehehe.


-Ghoulfrenzy
 
my bad ghoul...I missed that part...and u don't typ it.... on the trigger editor window....click on a yellow X and after a window pops up...click on the green X and now call it Illidan_Cache the type should be game cache..and press ok :D and after specify it in trigger editor
 
darkmaster24 said:
Events
Map initialization

Actions
Game Cache - Create a game cache from illidan.w3v
Game Cache - Restore illidan of hero from (Last created game cache) for Player 1 (Red) at (Center of start <gen>) facing 270.00

You have to recreate the game cache. Dont worry as long as you have the same names for the game chache the vaules in it is the same.

A variable wont work, becuse you are changing the map and variables isnt passed beetwen maps, that is the whole idee with the game cache.
 
ive tryed the variable method and it doesnt work, im gonna try recreating the cache.
edit: doesnt work either
 
sorry about the double post but its gone off the page so i hoped i could get away with a bump
 
This is the exact triggers from the blizzard demo campaigne

Store in first map:
Code:
Next Level Prep
    Events
    Conditions
    Actions
        -------- Remove Quest Items --------
        Item - Remove ItemSeed
        Item - Remove ItemVine
        -------- Save Heroes --------
        Game Cache - Create a game cache from DemoCampaign.w3v
        Game Cache - Store Thrall as Thrall of Demo04 in (Last created game cache)
        Game Cache - Save (Last created game cache)
        -------- Enable Missions, Campaigns, Cinematics --------
        -------- Show custom campaign button for the next level --------
        Game - Show custom campaign button 2



Load in second:
Code:
Load Heroes
    Events
    Conditions
    Actions
        -------- Create The Game Cache --------
        Game Cache - Create a game cache from DemoCampaign.w3v
        -------- Load Each Hero --------
        Trigger - Run Load Thrall <gen> (checking conditions)
Code:
Load Thrall
    Events
    Conditions
    Actions
        -------- Load Hero From Cache --------
        Game Cache - Restore Thrall of Demo04 from (Last created game cache) for AP1_Player at (Center of Intro Thrall Start <gen>) facing 350.00
        Set Thrall = (Last restored unit)
        If (Thrall Not equal to No unit) then do (Skip remaining actions) else do (Do nothing)
        -------- Create Default Hero --------
        Unit - Create 1 Thrall for AP1_Player at (Center of Intro Thrall Start <gen>) facing 350.00 degrees
        Hero - Set (Last created unit) Hero-level to 4, Hide level-up graphics
        Hero - Learn skill for (Last created unit): Orc Far Seer - Far Sight
        Hero - Learn skill for (Last created unit): Orc Far Seer - Chain Lightning
        Hero - Learn skill for (Last created unit): Orc Far Seer - Chain Lightning
        Hero - Learn skill for (Last created unit): Orc Far Seer - Feral Spirit
        Set Thrall = (Last created unit)


If you remove all all unnecesary stuff and merge the triggers you get this:
Store:
Code:
       Game Cache - Create a game cache from [B]<Some Name>[/B]
       Game Cache - Store <Unit> as [B]<Lable>[/B] of [B]<Category>[/B] in (Last created game cache)
        Game Cache - Save (Last created game cache)
Load:
Code:
        Game Cache - Create a game cache from [B]<Some Name>[/B]
        Game Cache - Restore [B]<Label>[/B] of [B]<Category>[/B] from (Last created game cache) for <Player> at <Point> facing <Real>
----Check if you need tho create a unit(game cache was empty)---

All bold stuff must be the same in both maps
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Varine Varine:
    Today I had to scramble, I didn't work most of dinner service and no one told me shit. They had a rough few hours lol
  • Varine Varine:
    I have two salmon, Sockeye and Atlantic. Atlantic is used for the kids salmon and the salmon and beet salad, and can also be added onto any dish or just as a side. Atlantic salmon will almost exclusively ever be FARMED, as it is endangered in the wild, and we ALWAYS cut them to 4 ounces.
  • Varine Varine:
    SOCKEYE salmon, very different and this IS wild caught. We have an ENTREE version, and an add on version. The entree is 7 ounces, the add on is 4. Why? Because that is how someone that wasn't me set up the computer.
  • Varine Varine:
    I had to have this conversation like ten fucking times tonight
  • Varine Varine:
    The issue being, I came into work and had none of this whatsoever
  • Varine Varine:
    No one told me shit
  • Varine Varine:
    So, taking into consideration that what I typed out up there is kind of some fucking nonsense that under normal circumstances no one really needs to fucking be able to explain in any rational way
  • Varine Varine:
    Let alone trying to figure it out from a wildly stressed out me that is also on a phone call trying to get something to show up from Seattle tomorrow while trying to explain this salmon situation, that also is barely solved in maybe a few hours and and but I am bulking it with a few steelhead filets I have and that is a WHOLE fucking different thing to the 19 year old server that got put on day shift C crew that doesn't know who I am.
  • Varine Varine:
    I did however really want days. I like getting off at 4 half the time, and that makes it worth it!
  • Varine Varine:
    Also I hate my job right now but I think that was the hard part. Now it's just work
  • Varine Varine:
    @jonas I'm sorry? I don't know what you're referring to.
  • Varine Varine:
    Once we hit winter I feel like I get to back to having a pretty cool job. Like I bitch about it all the time, but it's work. I'm still gonna bitch
  • Varine Varine:
    All in all though I think this summer is going really well. Some complicated things, but at the end of the day it isn't THAT big of a deal. Not all of our servers have quite realized they are technically sales
  • Varine Varine:
    Like yeah it is a substitute, but FOMO. Chef isn't getting this again this year, he has to figure it out, so it's slightly off on the menu, but that is more or less the LOWEST quality and price. Right now, steelhead is a real stealhear, right?
  • Varine Varine:
    Like fuck off even I can do it
  • Varine Varine:
    I am going to get one of my servers to do that in her server voice and you'll see my point
  • Varine Varine:
    Maybe the bartender. Idk, it's one of my favorite things to hear them go from calm to customer service voice. They will translate it to like "The chef is trying to change that a bit right now so he does have a Alaskan river steelhead. Yeah like the one you might fish probably!" And then the girls can bat their eyes and do pretty girl server shit
  • Varine Varine:
    At least that's how imagine some of them. Did you know mayonnaise is dairy free? A suprisingly amount of people don't\
  • The Helper The Helper:
    mayo is eggs right?
  • The Helper The Helper:
    Seems I never watched the Witcher - looks like i have a lot of content
  • The Helper The Helper:
    Season 1 Episode 8 the marathon continues...
  • jonas jonas:
    mayo is eggs & oil
    +1
  • The Helper The Helper:
    I got halfway season 2 on The Witcher and it lost me. I am going to have to pick this one up again later.
  • jonas jonas:
    season 2 is with the new actor right? it's so far below the first one
  • The Helper The Helper:
    first season was good the 2nd season is bleh I hope I can make it through it for 3

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials
      Top