• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Weird problem linking campaign maps

Status
Not open for further replies.
Level 9
Joined
Apr 19, 2011
Messages
447
Hi there.

I'm having some trouble linking maps in my campaign, as the title says. Look at this trigger:

  • Game Loading
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Game Cache - Create a game cache from AC.w3v
      • Set AC = (Last created game cache)
      • Set NEXT = (Load Next of Integers from AC)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • NEXT Igual a 0
        • Then - Actions
          • Game - Set the next level to Vahlon_(Start).w3x
          • Game - Victory Jugador 1 (rojo) (Saltar dialogs, Saltar scores)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • NEXT Igual a 1
            • Then - Actions
              • Game Cache - Store 4 as Previous of Integers in AC
              • Game Cache - Save AC
              • Game - Set the next level to Vahlon_Castle.w3x
              • Game - Victory Jugador 1 (rojo) (Saltar dialogs, Saltar scores)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • NEXT Igual a 2
                • Then - Actions
                  • Game Cache - Store 4 as Previous of Integers in AC
                  • Game Cache - Save AC
                  • Game - Set the next level to Vahlon.w3x
                  • Game - Victory Jugador 1 (rojo) (Saltar dialogs, Saltar scores)
                • Else - Actions
As you can see, there are a total of 3 "Set Next Level" actions. This trigger is a part of a custom saving system I want to make in my campaign. When you start the campaign, you'll only have two options:
- New Game: This option just starts the game from the beginning.
- Load Game: This option starts a map with the trigger you see above. The game will only be saved when the player activates certain checkpoints, and this trigger will allow them to resume playing at the last checkpoint they activated.

OK, this should work fine. However, it doesn't. Look at the following picture:

wxx6.jpg


The map with this trigger is "Load Game.w3x". Usually, when you link "Map A" to "Map B" with the "Set Next Level" action; in the campaign editor screen, "Map B" should appear listed below "Map A". You can see that most maps are connected between them like this.
However, nothing appears listed under "Load Game", the links from this map to the others don't seem to be working. Actually, when I start this map, instead of redirecting me to another different map, it keeps restarting itself. I mean, the maps starts, then it finishes, then it starts again, then it finishes again... when it should always take me to a different map.

I hope I explained myself correctly. I can't figure out why is this happening. This kind of linking has always worked for me, the other maps are correctly linked together in the same way, but the links don't seem to work for this specific map. I also searched through the forums, but I didn't found anything similar.
Can anyone help me? Thanks for reading.

Kind Regards
 
Level 10
Joined
Dec 15, 2012
Messages
650
If I am right then you just need to separate the actions inside "ITE" with triggers. Any pros pls correct me.
  • Actions
    • If ? = 1 then run trigger 1
    • If ? = 2 then run trigger 2
    • If ? = 3 then run trigger 3
  • trigger 1
  • Actions
    • Game - set next level to Hahaha
    • Game - Win
  • trigger 2
  • Actions
    • Game - set next level to Hehehe
    • Game - Win
  • trigger 3
  • Actions
    • Game - set next level to Hohoho
    • Game - Win
 
Level 9
Joined
Apr 19, 2011
Messages
447
Hi there, thanks for your answer. I don't really get why, but your solution actually solved the problem! Like you suggested, I separated the "Set Next Level" actions into a different trigger each of them, and it worked flawlessly. Thank you!

Kind Regards
 
Status
Not open for further replies.
Top