Map swirch

Status
Not open for further replies.
Level 2
Joined
Apr 7, 2013
Messages
8
In the orc cam in frozen thronebwith rexxar, there was a cool thing they did, when you entered a small area you where teleported to another map. How can i do like they did
 
Level 20
Joined
Apr 14, 2012
Messages
2,901
Just set the next level
  • Game - Set Next Level to...
then just end the current map using
  • Game - Victory for Player 1 (Red) Hide Dialogs Hide Scores
and do the same thing for the other map.

The events are Unit - Unit Enters Region.

But remember that
  • Game - Set Next Level to...
must be linked to the other map, like so:
For Map 1
  • Game - Set Next Level to Map 2
then for Map 2 use
  • Game - Set Next Level to Map 1
. Are you getting my flow? So the whole Trigger would be:
  • Map 1
  • Events
    • Unit - A Unit enters Map 2 Enter
  • Conditions
  • Actions
    • [Game - Set Next Level to Map 2
    • Game - Victory for Player 1 (Red) Hide Dialogs Hide Scores
Then for Map 2:
  • Map
  • Events
    • Unit - A Unit enters Map 1 Enter
  • Conditions
  • Actions
    • [Game - Set Next Level to Map 1
    • Game - Victory for Player 1 (Red) Hide Dialogs Hide Scores
But only use this method in a campaign.

And then as Zwiebelchen said below in the post below, use Game Chache to transfer the data (v below post v)
 
Last edited:
In the orc cam in frozen thronebwith rexxar, there was a cool thing they did, when you entered a small area you where teleported to another map. How can i do like they did
You need to make multiple maps, connecting them via a campaign.
Then you can use game cache to transfer data between the individual maps of the campaign.

This only works in single player.
 
Level 2
Joined
Apr 7, 2013
Messages
8
While we are on the subject, do you now how to make a respawn point for one players hero att at region.
When i try all hero seems to spawn there when they die
 
Level 30
Joined
Nov 29, 2012
Messages
6,637
  • Hero Respawn
  • Event
    • Unit - A Unit dies
  • Conditions
    • (Triggering Unit) is a Hero Equal to True
  • Actions:
    • Set Point = Center of Region
    • Set Hero = Triggering Unit
    • Hero - Revive Hero at Point show revival graphics
    • Custom Script = call RemoveLocation(udg_Point)
Kind of like this.

I think what he mean is only for one player. Each players has different spawn location... maybe.
 
Level 2
Joined
Apr 7, 2013
Messages
8
The travel beetween maps dont worl for me, could neef a bigger tutorial on how to do.
What i want. And also sorry for my bad english
1, to travel beetween maps like in the rexxar orc campaign(from like a big map to a dungon and then back when a enter a small area)
2. I want the hero i'm useing to travel with me on the maps,
3. When i revisit a map i want it to be like when i left from there.(like save the map not end it)
 
Level 14
Joined
Nov 17, 2010
Messages
1,266
I'm using something like that in my campaign. It can be complicated, but I've got it working between two maps perfectly (I will add more later)

First you need an initialization trigger that detects if this is the first time you have loaded this map

Note: I am using all of the variables from my map so the names might be a little strange, I don't have time to go through and change them all.


  • Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Game Cache - Create a game cache from LA_Cache.w3v
      • Set Cache_LA_cache = (Last created game cache)
      • Set Cache_LoadingFrom[1] = From Dillianhor <gen>
      • Set Cache_CallienthNewGame = False
      • Trigger - Turn off (This trigger)
      • Trigger - Run Load <gen> (ignoring conditions)
We also need a trigger for subsequent starts that loads everything from the game cache

  • Subsequent Starts
    • Events
      • Game - A saved game is loaded
    • Conditions
    • Actions
      • Game Cache - Create a game cache from LA_Cache.w3v
      • Set Cache_LA_cache = (Last created game cache)
      • Trigger - Run Load <gen> (ignoring conditions)
The load spell loads everything that you store in the Game Cache. This includes storing which map you came from. I also store the hero's level, xp, weapons, and a few custom stats.

  • Load
    • Events
    • Conditions
    • Actions
      • Game Cache - Reload all game cache data from disk
      • Set Cache_LeftFromMap = (Load LeftFromMap of Variables from Cache_LA_cache)
      • -------- Lithion Hero --------
      • Game Cache - Restore Lithion of Units from Cache_LA_cache for Player 1 (Red) at (Random point in Cache_LoadingFrom[Cache_LeftFromMap]) facing (Center of (Playable map area))
      • Set Lithion_Hero = (Last restored unit)
      • Unit - Set life of Lithion_Hero to 100.00%
      • Unit - Set mana of Lithion_Hero to 100.00%
      • Hero - Set Lithion_Hero experience to (Load LithionXP of Units from Cache_LA_cache), Hide level-up graphics
      • Hero - Set Lithion_Hero Hero-level to (Load LithionLevel of Units from Cache_LA_cache), Hide level-up graphics
      • If ((Load LithionLeftWeapon of Units from Cache_LA_cache) Equal to (==) 1) then do (Unit - Add Attachment (Shortsword Left) (Lithion 1) to Lithion_Hero) else do (Do nothing)
      • If ((Load LithionRightWeapon of Units from Cache_LA_cache) Equal to (==) 1) then do (Unit - Add Attachment (Shortsword Right) (Lithion 1) to Lithion_Hero) else do (Do nothing)
      • Set LithionWeapon_L = (Load LithionLeftWeapon of Units from Cache_LA_cache)
      • Set LithionWeapon_R = (Load LithionRightWeapon of Units from Cache_LA_cache)
      • Unit - Change color of Lithion_Hero to (Color of Player 11 (Dark Green))
      • Set LithionManaGen = (Load LithionManaGen of Units from Cache_LA_cache)
      • Set Spell_Power[1] = (Load LithionSpellPower of Units from Cache_LA_cache)
      • Set CB_Chance_Lithion = (Load LithionCBChance of Units from Cache_LA_cache)
      • Set CB_Damage_Lithion = (Load LithionCBDamage of Units from Cache_LA_cache)
      • -------- Hundalor Hero --------
      • Game Cache - Restore Hundalor of Units from Cache_LA_cache for Player 1 (Red) at (Random point in Cache_LoadingFrom[Cache_LeftFromMap]) facing (Center of (Playable map area))
      • Set Hundalor_Hero = (Last restored unit)
      • Unit - Set life of Hundalor_Hero to 100.00%
      • Unit - Set mana of Hundalor_Hero to 100.00%
      • Hero - Set Hundalor_Hero experience to (Load HundalorXP of Units from Cache_LA_cache), Hide level-up graphics
      • Hero - Set Hundalor_Hero Hero-level to (Load HundalorLevel of Units from Cache_LA_cache), Hide level-up graphics
      • If ((Load HundalorLeftWeapon of Units from Cache_LA_cache) Equal to (==) 1) then do (Unit - Add Attachment (Scepter Left) (Hundalor 1) to Hundalor_Hero) else do (Do nothing)
      • Set HundalorWeapon_L = (Load HundalorLeftWeapon of Units from Cache_LA_cache)
      • Unit - Change color of Hundalor_Hero to (Color of Player 11 (Dark Green))
      • Set HundalorManaGen = (Load HundalorManaGen of Units from Cache_LA_cache)
      • Set Spell_Power[2] = (Load HundalorSpellPower of Units from Cache_LA_cache)
      • Set CB_Chance_Hundalor = (Load HundalorCBChance of Units from Cache_LA_cache)
      • Set CB_Damage_Hundalor = (Load HundalorCBDamage of Units from Cache_LA_cache)
      • -------- Glainor Hero --------
      • Game Cache - Restore Glainor of Units from Cache_LA_cache for Player 1 (Red) at (Random point in Cache_LoadingFrom[Cache_LeftFromMap]) facing (Center of (Playable map area))
      • Set Glainor_Hero = (Last restored unit)
      • Unit - Set life of Glainor_Hero to 100.00%
      • Unit - Set mana of Glainor_Hero to 100.00%
      • Hero - Set Glainor_Hero experience to (Load GlainorXP of Units from Cache_LA_cache), Hide level-up graphics
      • Hero - Set Glainor_Hero Hero-level to (Load GlainorLevel of Units from Cache_LA_cache), Hide level-up graphics
      • If ((Load GlainorLeftWeapon of Units from Cache_LA_cache) Equal to (==) 1) then do (Unit - Add Attachment (Hammer Left) (Glainor 1) to Glainor_Hero) else do (If ((Load GlainorLeftWeapon of Units from Cache_LA_cache) Equal to (==) 5) then do (Unit - Add Attachment (Hammer Left) (Glainor 5) to Glainor_Hero) else do (Do nothing))
      • If ((Load GlainorArmor of Units from Cache_LA_cache) Equal to (==) 1) then do (Unit - Add Attachment (Wood Armor) (Glainor 1) to Glainor_Hero) else do (Do nothing)
      • If ((Load GlainorHelmet of Units from Cache_LA_cache) Equal to (==) 1) then do (Unit - Add Attachment (Captain Helmet) (Glainor 1) to Glainor_Hero) else do (Do nothing)
      • Set GlainorWeapon_L = (Load GlainorLeftWeapon of Units from Cache_LA_cache)
      • Set GlainorArmor = (Load GlainorArmor of Units from Cache_LA_cache)
      • Set GlainorHelmet = (Load GlainorHelmet of Units from Cache_LA_cache)
      • Unit - Change color of Glainor_Hero to (Color of Player 12 (Brown))
      • Set GlainorManaGen = (Load GlainorManaGen of Units from Cache_LA_cache)
      • Set Spell_Power[3] = (Load GlainorSpellPower of Units from Cache_LA_cache)
      • Set CB_Chance_Glainor = (Load GlainorCBChance of Units from Cache_LA_cache)
      • Set CB_Damage_Glainor = (Load GlainorCBDamage of Units from Cache_LA_cache)
      • -------- Extra Info --------
      • Player - Set Player 1 (Red) Current gold to (Load Gold of Property from Cache_LA_cache)
      • Player - Set Player 1 (Red) Current lumber to (Load Silver of Property from Cache_LA_cache)
      • Unit Group - Add Lithion_Hero to OurHeroes
      • Unit Group - Add Hundalor_Hero to OurHeroes
      • Unit Group - Add Glainor_Hero to OurHeroes
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • Cache_LeftFromMap Equal to (==) 1
          • Then - Actions
            • Camera - Apply Heroes Enter From Dillianhor <gen> for Player 1 (Red) over 0.00 seconds
          • Else - Actions
            • Do nothing
As far as actually storing stuff you just need a trigger for when a hero enters a region and save everything you will later load. This trigger also loads the next map.

  • Go To Dillianhor Yes
    • Events
      • Dialog - A dialog button is clicked for LeaveMap_Box
    • Conditions
      • (Clicked dialog button) Equal to (==) LeaveMap_Yes
    • Actions
      • Dialog - Hide LeaveMap_Box for Player 1 (Red)
      • Unit Group - Pick every unit in OurHeroes and do (Unit - Pause (Picked unit))
      • Trigger - Turn off (This trigger)
      • Cinematic - Fade out over 2.00 seconds using texture Black Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
      • Wait 3.00 seconds
      • Set Cache_LeftFromMap = 2
      • Game Cache - Clear all labels of Units in Cache_LA_cache
      • -------- ==========Lithion Hero========== --------
      • Game Cache - Store Lithion_Hero as Lithion of Units in Cache_LA_cache
      • -------- =====Lithion Level, XP, HP, Mana, Weapons===== --------
      • Game Cache - Store (Hero level of Lithion_Hero) as LithionLevel of Units in Cache_LA_cache
      • Game Cache - Store (Hero experience of Lithion_Hero) as LithionXP of Units in Cache_LA_cache
      • Game Cache - Store LithionWeapon_L as LithionLeftWeapon of Units in Cache_LA_cache
      • Game Cache - Store LithionWeapon_R as LithionRightWeapon of Units in Cache_LA_cache
      • Game Cache - Store LithionArmor as LithionArmor of Units in Cache_LA_cache
      • Game Cache - Store LithionManaGen as LithionManaGen of Units in Cache_LA_cache
      • Game Cache - Store Spell_Power[1] as LithionSpellPower of Units in Cache_LA_cache
      • Game Cache - Store CB_Chance_Lithion as LithionCBChance of Units in Cache_LA_cache
      • Game Cache - Store CB_Damage_Lithion as LithionCBDamage of Units in Cache_LA_cache
      • -------- ==========Hundalor Hero========== --------
      • Game Cache - Store Hundalor_Hero as Hundalor of Units in Cache_LA_cache
      • -------- =====Hundalor Level, XP, HP, Mana, Weapons===== --------
      • Game Cache - Store (Hero level of Hundalor_Hero) as HundalorLevel of Units in Cache_LA_cache
      • Game Cache - Store (Hero experience of Hundalor_Hero) as HundalorXP of Units in Cache_LA_cache
      • Game Cache - Store HundalorWeapon_L as HundalorLeftWeapon of Units in Cache_LA_cache
      • Game Cache - Store HundalorManaGen as HundalorManaGen of Units in Cache_LA_cache
      • Game Cache - Store Spell_Power[2] as HundalorSpellPower of Units in Cache_LA_cache
      • Game Cache - Store CB_Chance_Hundalor as HundalorCBChance of Units in Cache_LA_cache
      • Game Cache - Store CB_Damage_Hundalor as HundalorCBDamage of Units in Cache_LA_cache
      • -------- ==========Glainor Hero========== --------
      • Game Cache - Store Glainor_Hero as Glainor of Units in Cache_LA_cache
      • -------- =====Glainor Level, XP, HP, Mana, Weapons===== --------
      • Game Cache - Store (Hero level of Glainor_Hero) as GlainorLevel of Units in Cache_LA_cache
      • Game Cache - Store (Hero experience of Glainor_Hero) as GlainorXP of Units in Cache_LA_cache
      • Game Cache - Store GlainorWeapon_L as GlainorLeftWeapon of Units in Cache_LA_cache
      • Game Cache - Store GlainorArmor as GlainorArmor of Units in Cache_LA_cache
      • Game Cache - Store GlainorHelmet as GlainorHelmet of Units in Cache_LA_cache
      • Game Cache - Store GlainorManaGen as GlainorManaGen of Units in Cache_LA_cache
      • Game Cache - Store Spell_Power[3] as GlainorSpellPower of Units in Cache_LA_cache
      • Game Cache - Store CB_Chance_Glainor as GlainorCBChance of Units in Cache_LA_cache
      • Game Cache - Store CB_Damage_Glainor as GlainorCBDamage of Units in Cache_LA_cache
      • -------- ==========Player Properties========== --------
      • Game Cache - Store (Player 1 (Red) Current gold) as Gold of Property in Cache_LA_cache
      • Game Cache - Store (Player 1 (Red) Current lumber) as Silver of Property in Cache_LA_cache
      • -------- ==========Variables========== --------
      • Game Cache - Store Cache_LeftFromMap as LeftFromMap of Variables in Cache_LA_cache
      • Game Cache - Store Cache_CallienthNewGame as CallienthNewGame of Variables in Cache_LA_cache
      • -------- Save --------
      • Game Cache - Save Cache_LA_cache
      • Unit Group - Pick every unit in OurHeroes and do (Unit - Remove (Picked unit) from the game)
      • Game - Save game as Saves\LACM.w3z and load Saves\LADF.w3z (Skip scores)
For each map you will have to copy these triggers and change the things that are different like which map you are going to and coming from. Play around with it a little and you'll get it. Good luck!
 
Status
Not open for further replies.
Top