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 haven't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. From the gates of hell, the 5th Special Effect Contest Results have emerged.
    Dismiss Notice
  4. Rubbed the right way, the genie is out of its lamp! The 12th Concept Art Contest Results have been announced.
    Dismiss Notice
  5. Race against the odds and Reforge, Don't Refund. The 14th Techtree Contest has begun!
    Dismiss Notice
  6. 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.

Transitions in Campaigns Guide

Discussion in 'General Mapping Tutorials' started by Starquizer, Jul 20, 2012.

  1. Starquizer

    Starquizer

    Joined:
    Mar 3, 2006
    Messages:
    1,526
    Resources:
    6
    Maps:
    1
    Spells:
    2
    Tutorials:
    3
    Resources:
    6
    Transitions in Campaigns Guide

    This tutorial will teach you how to make a campaign with multiple maps that you can navigate through, like the 'Orc Bonus Campaign' but in much more advanced fashion.

    In fact, Ralle's tutorial inspired me to make this one also with example campaign implemented with the tutorial for more detailed illustration.

    Last word before we get started, I am using Blizzard's style and names for the triggers and variable; the reason for that is when I started learning how to make transition I used Blizzard's triggers and learned from it.

    Now lets get started,

    The idea to link the entire map network is very simple; this idea is giving each map a unique ID; that ID will be the reference to this map in the map network.

    A picture to explain ...
    [​IMG]

    As you can see, each area has a number which represents its ID; this ID is the key for making the transition work

    Lets see the triggers then ...

    Note: You could merge the following triggers' actions if you want but I like Blizzard's Style

    A list of common variables and their type: (Sorted by Type)

    Variable Name Variable Type Initial Value

    TransitionDataHT Hashtable - None -
    AreaCount Integer 0 (Default)
    AreaIndex Integer 0 (Default)
    NHeroes Integer 0 (Default)
    RestorePointIndex Integer 0 (Default)
    SourceAreaIndex Integer 0 (Default)
    TargetAreaIndex Integer 0 (Default)
    Controller Player - None -
    RestorePoint Point - None -
    RestorePointReference Point Array (20) - None -
    Facing Real 0 (Default)
    FacingRestore Real Array (20) 0 (Default)
    AreaName String - None -
    CacheName String - None -
    MapExtension String - None -
    SaveExtension String - None -
    TransitionKey String - None -
    AreaMap String Array (20) - None -
    AreaSave String Array (20) <Empty String>
    TransitionHero Unit - None -
    Hero Unit Array (4) - None -

    The first trigger will be the 'Init SyncData' fired by 'Map Initialization'
    • Initialization
      • Events
        • Map initialization
      • Conditions
      • Actions
        • Trigger - Run Init 01 Players <gen> (checking conditions)
        • Trigger - Run Init 02 Units <gen> (checking conditions)
        • Trigger - Run Init 03 Items <gen> (checking conditions)
        • Trigger - Run Init 04 Quests <gen> (checking conditions)
        • Trigger - Run Init 09 SyncData <gen> (checking conditions)


    • Init 05 SyncData
      • Events
      • Conditions
      • Actions
        • Trigger - Run Init Zones <gen> (checking conditions)

    The number '09' is just there to order the triggers in the list; its has nothing to do with the triggering

    This trigger will include all data that need to be synchronized with the other maps as you will see later in this tutorial.


    • Init Zones
      • Events
      • Conditions
      • Actions
        • -------- Current Area ID --------
        • Trigger - Run Identify Area <gen> (checking conditions)
        • -------- General Transition Data --------
        • Set CacheName = CCampaign.w3v
        • Hashtable - Create a hashtable
        • Set TransitionDataHT = (Last created hashtable)
        • Set TransitionKey = (tt + Transitions)
        • Set SaveExtension = .w3z
        • Set MapExtension = .w3x
        • Set AreaCount = 6
        • -------- Area Names --------
        • Set AreaMap[1] = AR0100
        • Set AreaMap[2] = AR0101
        • Set AreaMap[3] = AR0102
        • Set AreaMap[4] = AR0103
        • Set AreaMap[5] = AR0104
        • Set AreaMap[6] = AR0105
        • -------- Restore Points Data --------
        • -------- The 1st number in the hashtable is the child key and it represents the restore position index --------
        • -------- The 2nd number in the hashtable is the parent key and it represents the area index --------
        • Hashtable - Save Handle Of(Center of HeroRestore from Forests <gen>) as 1 of 2 in TransitionDataHT
        • Hashtable - Save Handle Of(Center of HeroRestore from Waterfalls <gen>) as 1 of 3 in TransitionDataHT
        • Hashtable - Save Handle Of(Center of HeroRestore from Caves A <gen>) as 1 of 5 in TransitionDataHT
        • Hashtable - Save Handle Of(Center of HeroRestore from Caves B <gen>) as 2 of 5 in TransitionDataHT
        • Hashtable - Save Handle Of(Center of HeroRestore from Volcano Cave <gen>) as 1 of 6 in TransitionDataHT
        • -------- Restore Facing Angle Data --------
        • Hashtable - Save 270.00 as 1 of 2 in TransitionDataHT
        • Hashtable - Save 0.00 as 1 of 3 in TransitionDataHT
        • Hashtable - Save 270.00 as 1 of 5 in TransitionDataHT
        • Hashtable - Save 90.00 as 2 of 5 in TransitionDataHT
        • Hashtable - Save 180.00 as 1 of 6 in TransitionDataHT
    This is taken from the campaign I attached to this tutorial, so names here are just for examples.

    This trigger is the most important one in transition because this will determine and identify the entire map network. Although most of the following triggers are identical; this one will be different from one map (Area) to another but the top of this trigger will be identical though.

    • Actions
      • -------- Current Area ID --------
      • Trigger - Run Identify Area <gen> (checking conditions)
    This trigger will identify the area we are in now, like this:

    • Identify Area
      • Events
      • Conditions
      • Actions
        • Set AreaIndex = 1
        • Set AreaName = AR0100

    AreaIndex, this integer will hold the Area ID
    AreaName, this string will hold the area name, you could name it what you want but its important that this name be unique as well; that's why I am using this name AR####

    • Set CacheName = CCampaign.w3v

    This will be common in all maps.

    • Actions
      • Hashtable - Create a hashtable
      • TransitionDataHT = (Last created hashtable)

    We need to store the data of the transition. I used hashtable because I need a 2D-array-like variables if you like dynamic 2D array its alright but I prefer this.

    • Set TransitionKey = (tt + Transitions)

    That is the name of the cache category, name it what you want, tt refers to Transition Tutorial.

    • Set SaveExtension = .w3z
    • Set MapExtension = .w3x

    Well, this is self-explanatory, it is easier to store things in variables that way it is more easier to edit later.

    • Set AreaCount = 6

    This variable is the total count of maps (Areas) in your entire campaign.

    • Actions
      • -------- Area Names --------
      • Set AreaMap[1] = AR0100
      • Set AreaMap[2] = AR0101
      • Set AreaMap[3] = AR0102
      • Set AreaMap[4] = AR0103
      • Set AreaMap[5] = AR0104
      • Set AreaMap[6] = AR0105

    As I mentioned before I named my areas as AR####, here is a full list of the entire area network, ID (array index) must be correct to the corresponding area name, meaning you can't make this:

    • Actions
      • -------- Area Names --------
      • Set AreaMap[1] = AR0101
      • Set AreaMap[2] = AR0100
      • Set AreaMap[3] = AR0105
      • Set AreaMap[4] = AR0103
      • Set AreaMap[5] = AR0104
      • Set AreaMap[6] = AR0102

    So be careful when setting the variables.

    Well that is the identical part in this trigger in all maps.

    • Actions
      • -------- Restore Points Data --------
      • Hashtable - Save Handle Of(Center of HeroRestore from Forests <gen>) as 1 of 2 in TransitionDataHT

    I am storing the points in the hastable, Restore Point, and it is the point that your units will be restored at from the cache.

    I am using two integers as keys for the hastable, the first number, is called (I call it) "Restore Position Index". Areas may have more than one entrance for the same area so we need an ID for each entrance. The second number, is "Area Index" and this is the unique ID for each area I mentioned above.

    So when I store a RestorePoint as 1 of 2 what does that mean ?

    It means that point we are storing the restore point of the area with ID = 2 and restore position index = 1

    Another example:

    • Actions
      • Hashtable - Save Handle Of(Center of HeroRestore from Caves A <gen>) as 1 of 5 in TransitionDataHT
      • Hashtable - Save Handle Of(Center of HeroRestore from Caves B <gen>) as 2 of 5 in TransitionDataHT

    Here is an area ID = 5 for both points but with different Position IDs, later in this tutorial I will explain further how to use those IDs.

    Remember, a hashtable can store one handle only and since points (Locations) are handles so we can't save another handle that's why I will store Reals as the facing angle after the unit is restored. Like this:

    • Actions
      • -------- Restore Facing Angle Data --------
      • Hashtable - Save 270.00 as 1 of 2 in TransitionDataHT
      • Hashtable - Save 0.00 as 1 of 3 in TransitionDataHT
      • Hashtable - Save 270.00 as 1 of 5 in TransitionDataHT
      • Hashtable - Save 90.00 as 2 of 5 in TransitionDataHT
      • Hashtable - Save 180.00 as 1 of 6 in TransitionDataHT


    You may have noticed that there are integers not in the list, why is that ?
    - That means that this area can't be reached from the current area.

    Now, I have finished the Area Initialization trigger.

    Transition to a certain Area

    • To the Forests
      • Events
        • Unit - A unit enters Transition2Forests <gen>
      • Conditions
        • (The trigger queue is empty) Equal to True
        • (Owner of (Triggering unit)) Equal to Controller
        • ((Triggering unit) is A Hero) Equal to True
      • Actions
        • Trigger - Turn off (This trigger)
        • Set TargetAreaIndex = 2
        • Set RestorePointIndex = 1
        • Trigger - Add Area Change Begin <gen> to the trigger queue (Checking conditions)
        • Wait 4.00 seconds
        • Trigger - Turn on (This trigger)

    The first condition must ensure that the trigger Q is empty so that if we are in the middle of a cinematic the trigger don't fire during that cinematic (assuming that the cinematic trigger is added to the Q as well).

    The 2nd condition checks the player, Controller is a variable and 3rd condition is to check that the entering unit is a hero so that not any unit could fire the trigger.

    Now to explain the Actions ...

    • Set TargetAreaIndex = 2

    This tells the transition system that the ID of the area we are going to is 2 and in the Area Initialization (named Init Zones) we are referring to 'AR0101' with ID = 2 so that means it will take us to 'AR0101'.

    • Set RestorePointIndex = 1

    This is identifying the position we are using to get to the next area (AR0101) but this area (AR0101) has only one entrance from the current area (AR0100) so we have only one "RestorePointIndex".

    • Trigger - Add Area Change Begin <gen> to the trigger queue (Checking conditions)

    Remember that the trigger is added to the Q and not run as most triggers.

    • Area Change Begin
      • Events
      • Conditions
      • Actions
        • Cinematic - Fade out over 0.25 seconds using texture White Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
        • Wait 0.25 seconds
        • Cinematic - Turn cinematic mode On for (All players) over 0.20 seconds
        • Wait 0.20 seconds
        • Trigger - Run Transition <gen> (checking conditions)

    This adds an Eye Candy mini-cinematic just like Blizzard did (The effect was nice so I added it here) but most importantly this trigger runs another important triggers that I will explain it soon.

    • Transition
      • Events
      • Conditions
      • Actions
        • Set SourceAreaIndex = AreaIndex
        • Set AreaSave[SourceAreaIndex] = (AreaMap[SourceAreaIndex] + SaveExtension)
        • Trigger - Run Export All <gen> (checking conditions)
        • Trigger - Run Perform Map Transition <gen> (checking conditions)

    We need to store the Index of the source area which is the current area, we already identified the current area in the initialization.

    Now we prepare a string for the save named after the current area and stored in an array string variable with the Source Area ID (current area ID) as an array index.

    After that we need to store all our mission data in a cache, like the quests progress, your resources and most importantly your heroes. (will be explained later)

    Finally, we perform the transition which is "Saving And Loading" or "Saving And Changing Level" depending on whether we visited the target area before or not.


    Performing the Transition

    • Perform Map Transition
      • Events
      • Conditions
      • Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • AreaSave[TargetAreaIndex] Not equal to <Empty String>
            • (The AreaSave[TargetAreaIndex] saved-game exists) Equal to True
          • Then - Actions
            • Game - Display to (All players) the text: Loading ...
            • Game - Save game as AreaSave[SourceAreaIndex] and load AreaSave[TargetAreaIndex] (Skip scores)
          • Else - Actions
            • Game - Display to (All players) the text: Initializing ...
            • Game - Save game as AreaSave[SourceAreaIndex] and change level to (AreaMap[TargetAreaIndex] + MapExtension) (Skip scores)

    The transition system must check if the target area will be initialized (lets call it start-up) or will be loaded, in order to do that some conditions must be implemented. Firstly, if an existing save for the target area exists then that means that this area has been visited before (initialized or started-up) but what if a new campaign is started and the old save of the previous campaign for the target area exists, what will happen .... ?

    Well, the saved game will be loaded and the target area will be loaded as well but the status of the area will belong to the old game, so another condition is needed for checking the string variable that store the names of the saves, since those variables are set to <Empty String> each time a new campaign is started it will not matter if the saved game exists or not.

    Note that the messages that I added are just for testing and is better if they are removed.

    Exporting data to cache

    • Export All
      • Events
      • Conditions
      • Actions
        • Game Cache - Create a game cache from CacheName
        • Game Cache - Clear all labels of TransitionKey in (Last created game cache)
        • -------- Export Area Saves (Saved-game filenames) --------
        • For each (Integer A) from 1 to AreaCount, do (Actions)
          • Loop - Actions
            • Game Cache - Store AreaSave[(Integer A)] as (AreaSave + (String((Integer A)))) of TransitionKey in (Last created game cache)
        • -------- Export Transition Data --------
        • Game Cache - Store SourceAreaIndex as SourceAreaIndex of TransitionKey in (Last created game cache)
        • Game Cache - Store RestorePointIndex as RestorePointIndex of TransitionKey in (Last created game cache)
        • -------- Export Campaign Data and Heroes --------
        • Trigger - Run Export Mission Data <gen> (checking conditions)
        • Trigger - Run Export Hero <gen> (checking conditions)
        • Game Cache - Save (Last created game cache)

    First, the Game cache is created then it must be cleared to make it up-to-date to the mission data.

    The strings holding the save names must be stored to be able to load them from any area. Also, the source area ID and the restore point index must be stored as well because in the target area it is important to know the ID of the area we are coming from.

    • Export Mission Data
      • Events
      • Conditions
      • Actions
        • Game Cache - Store (Controller Current gold) as Res_Gold of TransitionKey in (Last created game cache)
        • Game Cache - Store (Controller Current lumber) as Res_Lumber of TransitionKey in (Last created game cache)

    Store the mission data and quest data here, also, the player's current gold and lumber are stored as well.

    • Export Hero
      • Events
      • Conditions
      • Actions
        • Set TransitionHero = Hero[1]
        • Game Cache - Store TransitionHero as Hero1 of TransitionKey in (Last created game cache)
        • Game Cache - Store (Life of TransitionHero) as HeroLife1 of TransitionKey in (Last created game cache)
        • Game Cache - Store (Mana of TransitionHero) as HeroMana1 of TransitionKey in (Last created game cache)
        • Unit - Remove TransitionHero from the game

    Export your heroes with their current life and mana as when a heroes is restored from cache his life and mana become full.

    I made the trigger this way in case I have more than one hero then a loop could be used and will be like this:

    • Actions
      • Game Cache - Store NHeroes as NHeroes of TransitionKey in (Last created game cache)
      • For each (Integer A) from 1 to NHeroes, do (Actions)
        • Loop - Actions
          • Set TransitionHero = Hero[(Integer A)]
          • Game Cache - Store TransitionHero as (Hero + (String((Integer A)))) of TransitionKey in (Last created game cache)
          • Game Cache - Store (Life of TransitionHero) as (HeroLife + (String((Integer A)))) of TransitionKey in (Last created game cache)
          • Game Cache - Store (Mana of TransitionHero) as (HeroMana + (String((Integer A)))) of TransitionKey in (Last created game cache)
          • Unit - Remove TransitionHero from the game

    NHeroes is an integer storing the number of heroes we have in the game, this variable is set during the game via other triggers but it is not relevant to transition system; all that is important is the variable 'NHeroes'.

    Now, the data exporting phase is done.


    Since the target area is visited for the first time the Initialization trigger will run so the data needs to be synced. After that, this area will always be loaded and sync will be easier.


    There is a difference between this area and the previous area (which we came from); in the starting area (first area the campaign start with) the Hero(es) is created but in this area they are restored so in the initialization no need to create a hero, if the hero can be restored with no problem but that is related to the hero restoration part which I will explain soon.

    The target area is initialized, let's see ...

    • Initialization
      • Events
        • Map initialization
      • Conditions
      • Actions
        • Trigger - Run Init 01 Units <gen> (checking conditions)
        • Trigger - Run Init 02 Players <gen> (checking conditions)
        • Trigger - Run Init 03 SyncData <gen> (checking conditions)

    No problem with this trigger, just like the previous one.

    • Init 03 SyncData
      • Events
      • Conditions
      • Actions
        • Trigger - Run Init Zones <gen> (checking conditions)
        • Trigger - Run Import All <gen> (checking conditions)
        • Camera - Pan camera for Controller to RestorePoint over 0.00 seconds
        • Selection - Select TransitionHero for Controller

    This is different than the trigger in the previous map but it is important that 'Init Zones' run before 'Import All'.

    • Import All
      • Events
      • Conditions
      • Actions
        • Game Cache - Reload all game cache data from disk
        • Game Cache - Create a game cache from CacheName
        • -------- Import Zone Saves --------
        • For each (Integer A) from 1 to AreaCount, do (Actions)
          • Loop - Actions
            • Set AreaSave[(Integer A)] = (Load (AreaSave + (String((Integer A)))) of TransitionKey from (Last created game cache))
        • -------- Import Transition Data --------
        • Set SourceAreaIndex = (Load SourceAreaIndex of TransitionKey from (Last created game cache))
        • Set RestorePointIndex = (Load RestorePointIndex of TransitionKey from (Last created game cache))
        • Trigger - Run Import Mission Data <gen> (checking conditions)
        • Trigger - Run Import Heroes <gen> (checking conditions)

    All data is reloaded from the disk then the cache is created.

    Note
    I have seen many examples in which the cache is created first then all data is reloaded from disk but I don't know which is correct or better but it seems the two methods work


    Remember what was done in the trigger 'Export All'; the string variables storing the saves name was stored on the cache now we get them back from the cache and assign them to string variables having the same name. Also, the source area ID must be assigned to a variable as well as the restore point index.

    After that, we import the mission data and the heroes.


    • Import Mission Data
      • Events
      • Conditions
      • Actions
        • -------- Restore Resources --------
        • Player - Set Controller Current gold to (Load Res_Gold of TransitionKey from (Last created game cache))
        • Player - Set Controller Current lumber to (Load Res_Lumber of TransitionKey from (Last created game cache))

    Self-explanatory

    • Import Heroes
      • Events
      • Conditions
      • Actions
        • Trigger - Run Set Hero Locations <gen> (checking conditions)
        • Trigger - Run Import Hero 1 <gen> (checking conditions)

    While exporting the hero there was no need to set the restore location, just save the hero on the cache then remove him and that's it, but here we need to set the restore point and here comes the role of the source area ID and the restore point index.

    • Set Hero Locations
      • Events
      • Conditions
      • Actions
        • Set RestorePoint = (Load RestorePointIndex of SourceAreaIndex in TransitionDataHT)
        • Set Facing = (Load RestorePointIndex of SourceAreaIndex from TransitionDataHT)

    I am using the restore point index and the source area ID as the hashtable keys, so its important to set the right restore point at the initialization.

    A trigger from top

    • Init Zones
      • Events
      • Conditions
      • Actions
        • -------- Current Area ID --------
        • Trigger - Run Identify Area <gen> (checking conditions)
        • -------- General Transition Data --------
        • Set CacheName = CCampaign.w3v
        • Hashtable - Create a hashtable
        • Set TransitionDataHT = (Last created hashtable)
        • Set TransitionKey = (tt + Transitions)
        • Set SaveExtension = .w3z
        • Set MapExtension = .w3x
        • Set AreaCount = 6
        • -------- Area Names --------
        • Set AreaMap[1] = AR0100
        • Set AreaMap[2] = AR0101
        • Set AreaMap[3] = AR0102
        • Set AreaMap[4] = AR0103
        • Set AreaMap[5] = AR0104
        • Set AreaMap[6] = AR0105
        • -------- Restore Points Data --------
        • -------- The 1st number in the hashtable is the child key and it represents the restore position index --------
        • -------- The 2nd number in the hashtable is the parent key and it represents the area index --------
        • Hashtable - Save Handle Of(Center of HeroRestore from Camp <gen>) as 1 of 1 in TransitionDataHT
        • Hashtable - Save Handle Of(Center of HeroRestore from Hills <gen>) as 1 of 4 in TransitionDataHT
        • -------- Restore Facing Angle Data --------
        • Hashtable - Save 90.00 as 1 of 1 in TransitionDataHT
        • Hashtable - Save 0.00 as 1 of 4 in TransitionDataHT


    Notice the similarity between this trigger and the one in the previous area except for the restore point part.


    • Import Hero 1
      • Events
      • Conditions
      • Actions
        • Game Cache - Restore Hero1 of TransitionKey from (Last created game cache) for Controller at RestorePoint facing Facing
        • Set Hero[1] = (Last restored unit)
        • Set TransitionHero = (Last restored unit)
        • Unit - Set life of TransitionHero to (Load HeroLife1 of TransitionKey from (Last created game cache))
        • Unit - Set mana of TransitionHero to (Load HeroMana1 of TransitionKey from (Last created game cache))

    Since I am using one hero in my tutorial campaign, I am using that trigger in this form but just in case you have more than one hero the trigger will look like this:

    • Import Hero
      • Events
      • Conditions
      • Actions
        • Set NHeroes = (Load NHeroes of TransitionKey from (Last created game cache))
        • For each (Integer A) from 1 to NHeroes, do (Actions)
          • Loop - Actions
            • Game Cache - Restore (Hero + (String((Integer A)))) of TransitionKey from (Last created game cache) for Controller at RestorePointFormation[(Integer A)] facing Facing
            • Set Hero[(Integer A)] = (Last restored unit)
            • Set TransitionHero = (Last restored unit)
            • Unit - Set life of TransitionHero to (Load (HeroLife + (String((Integer A)))) of TransitionKey from (Last created game cache))
            • Unit - Set mana of TransitionHero to (Load (HeroMana + (String((Integer A)))) of TransitionKey from (Last created game cache))

    The variable RestorePointFormation[] is set based on the RestorePoint that can be set in 'Set Hero Locations' trigger using separate triggers to choose the formation you want.

    That concludes the Initialization part, lets now try to return to the previous area and see how we could do that.

    • Road to Camp
      • Events
        • Unit - A unit enters Transition2Camp <gen>
      • Conditions
        • (The trigger queue is empty) Equal to True
        • (Owner of (Triggering unit)) Equal to Controller
        • ((Triggering unit) is A Hero) Equal to True
      • Actions
        • Trigger - Turn off (This trigger)
        • Set TargetAreaIndex = 1
        • Set RestorePointIndex = 1
        • Trigger - Add Area Change Begin <gen> to the trigger queue (Checking conditions)
        • Wait 4.00 seconds
        • Trigger - Turn on (This trigger)

    I guess there is no need to explain this one, just telling the Transition System the ID of the target area and the position index.

    The same triggers will run as mentioned above (Export All, Export Mission Data ... etc)

    After the previous area loads

    At first the map was initialized but now the saved game will be loaded.

    • Game Load
      • Events
        • Game - A saved game is loaded
      • Conditions
        • (Map transitioned is set) Equal to True
      • Actions
        • Trigger - Run Import All <gen> (checking conditions)
        • Trigger - Run Resume Game <gen> (checking conditions)
        • Trigger - Run Disable Area Restart <gen> (checking conditions)

    'Import All' is the same as mentioned above, only the other two triggers are the different one and I will show them soon.

    • Resume Game
      • Events
      • Conditions
      • Actions
        • -------- Set camera --------
        • Camera - Pan camera for Controller to RestorePoint over 0.00 seconds
        • Trigger - Add Area Change Finish <gen> to the trigger queue (Checking conditions)
        • Trigger - Remove Area Change Begin <gen> from the trigger queue
        • Wait 0.51 seconds
        • Selection - Select TransitionHero for Controller

    This trigger remove the trigger that was added to the Q when we was in this map in the first place. The other actions for good camera and fading effects.

    • Area Change Finish
      • Events
      • Conditions
      • Actions
        • Cinematic - Fade out over 0.00 seconds using texture White Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
        • Wait 0.50 seconds
        • Cinematic - Turn cinematic mode Off for (All players) over 0.30 seconds
        • Wait 0.20 seconds
        • Cinematic - Fade in over 0.50 seconds using texture White Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
        • Wait 0.50 seconds
        • Trigger - Remove (This trigger) from the trigger queue


    As for disabling the restart button this is done in all maps excluding the start area (AR0100). The triggers is like this:
    • Disable Area Restart
      • Events
      • Conditions
      • Actions
        • Wait 0.00 seconds
        • Custom script: call DisableRestartMission( false )


    Now we are in the main area (AR0100), returning to the other area will make it load not initialize and the triggers will be the same. If we go to another area then it will be initialized if we hadn't visit it before but the triggers will remain the same.

    An example campaign is attached for proper illustration.

    I hope you like this tutorial.

    Good Mapping.


    More will be added to this tutorial but that is the basic things needed to make a Transition System.

    For JASS lovers
    I will work hard to make this in JASS


    Update List
    11:52 PM 7/27/2012 Updated the attached campaign
     

    Attached Files:

    Last edited by a moderator: Jul 30, 2012
  2. PurgeandFire

    PurgeandFire

    Code Moderator

    Joined:
    Nov 11, 2006
    Messages:
    7,428
    Resources:
    18
    Icons:
    1
    Spells:
    4
    Tutorials:
    9
    JASS:
    4
    Resources:
    18
    Nice job. Very detailed. You made nice samples and explained the purpose of each line very well.

    I don't see anything wrong with it. Approved.
     
  3. Magtheridon96

    Magtheridon96

    Joined:
    Dec 12, 2008
    Messages:
    6,006
    Resources:
    26
    Maps:
    1
    Spells:
    8
    Tutorials:
    7
    JASS:
    10
    Resources:
    26
    - Use hidden tags to hide triggers.
    - Use BB-codes such as [b][/b] [i][/i] [u][/u] along with some colors to enhance the text.
    - You can also use the [indent][/indent] tag to make the text look nicer.

    edit
    Splitting the tutorial into sections and adding a Table of Contents would be nice.
    You can also make use of the [list][/list] tag.


    [list]

    [*] blabla

    [*] blabla

    [*] blabla

    [/list]