1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. The raddest synthwave tracks were chosen - Check out our Music Contest #12 - Results and congratulate the winners!
    Dismiss Notice
  4. The poll for Hive's 12th Concept Art Contest is up! Go cast your vote for your favourite genie!
    Dismiss Notice
  5. Travel to distant realms and encounter scenes unknown to the common folk. The Greatest of Adventures is upon us with the 8th Cinematic Contest. Join in on a fun ride.
    Dismiss Notice
  6. The 18th Icon Contest is ON! Choose any ingame unit and give him/her Hero abilities. Good luck to all.
    Dismiss Notice
  7. Contestants are to create a scene set in the Stone Age. Come and see what you can come up with. We wish you the best of luck!
    Dismiss Notice
  8. Colour outside the lines! Techtree Contest #13 is a go. The contest is optionally paired.
    Dismiss Notice
  9. Greetings cerebrates, our Swarm needs new spawners that will have numerous children. Join the HIVE's 31st Modeling Contest - Spawners and Spawned! The contest is optionally paired.
    Dismiss Notice
  10. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Campaign: Hero?

Discussion in 'World Editor Help Zone' started by woxx, Mar 25, 2009.

  1. woxx

    woxx

    Joined:
    Jun 27, 2008
    Messages:
    140
    Resources:
    0
    Resources:
    0
    Hi! Need some help of you nice people on the hive!

    I was thinking of making a hero based campaign until i ran into the problem that i dont know how to make the heros stats, items and exp stay to the next map. Please give me an answere!
     
  2. greasontim

    greasontim

    Joined:
    Oct 27, 2008
    Messages:
    1,176
    Resources:
    0
    Resources:
    0
    r u new to makeing heros or new to map makeing?
     
  3. ArneXis

    ArneXis

    Joined:
    Nov 24, 2007
    Messages:
    466
    Resources:
    1
    Maps:
    1
    Resources:
    1
    First, decide on what your gamecache should be called. I'll call mine TestCache.w3v. Open up your first playable map. Again, go to the trigger editor to before the Victory! line. Add these lines:Game Cache - Create a game cache for TestCache.w3v
    Game Cache - Store Paladin 0000 as John the Paladin of Map 1 in (Last Created Game Cache)
    Game Cache - Save (Last Created Game Cache)
    You may be wondering "Why would I want to store him 'of Map 1'? Why not just 'of Heroes' or something?" The answer is simple: If, say, your player completes the game then goes back to map #3, if you use 'of Heroes' for every map, you will then create a level 14 hero with uberhaxx items, or whatever the hero was at the start of your last map. You don't want that, now, do you? So we save him 'of Map 1' so that Map 2 knows to use the hero from the map before, and not from map 14. So for map 1 you use "of Map 1", map 2 you use "of Map 2", etc. (You may not want them to be called "of Map #").

    Okay. You have map #1 save the hero, but how do you make map #2 load him? Simple. Create a region where you want him to appear. Next, create a Unit variable with his name, or something. Then, add this to your Initialization trigger, after a brief wait (NOT right at the beginning!).Game Cache - Reload all game cache data from disk
    Game Cache - Create a game cache for TestCache.w3v (do not forget the .w3v!)
    Game Cache - Restore John the Paladin of Map 1 at (Center of (GameCacheRegion <gen>)) facing (Default Building Facing 270.00) degrees
    Set John = (Last Restored Unit)Add that to every map (with appropriate changes) and go and test it. You now have your very own fully-working game cache!