[Trigger] Fast question - condition

Level 4
Joined
Sep 27, 2018
Messages
61
Hello, i have doubts about if the condition (Filename saved-game exists) is already working?. I need to check the game-folder not with booleans:

  • Salir
    • Events
      • Unit - A unit enters Region 012 <gen>
    • Conditions
      • Pala Equal to (Entering unit)
    • Actions
      • Trigger - Turn off (This trigger)
      • Trigger - Run GuardarHeroe <gen> (checking conditions)
      • Wait 1.00 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (The Checkpoints\Slot2\Checkpoint.w3z saved-game exists) Equal to Verdadero
        • Then - Actions
          • Game - Delete the Checkpoints saved-game folder
          • Game - Display to (All players) the text: Sobrescirbiendo
          • Game - Create campaign checkpoint with name Checkpoints\Slot2\Checkpoint.w3z (Show checkpoint message)
        • Else - Actions
          • Game - Create campaign checkpoint with name Checkpoints\Slot2\Checkpoint.w3z (Show checkpoint message)
      • Set VariableSet CopyA = Verdadero
1742080199366.png
1742080213294.png


As I'm using reforged, so there is no way to create campaings, so we create separete maps what makes some "game" funtions not work out of campaings (triggers).
 
Last edited:
Level 30
Joined
Feb 18, 2014
Messages
3,623
I'm not sure what you are trying to do here but the condition should work fine as long as you are overwriting the checkpoint instead of creating duplicates. Make sure you are limiting the maximum amount of checkpoints to 1 in order to overwrite the same checkpoint.
 
Level 4
Joined
Sep 27, 2018
Messages
61
I'm not sure what you are trying to do here but the condition should work fine as long as you are overwriting the checkpoint instead of creating duplicates. Make sure you are limiting the maximum amount of checkpoints to 1 in order to overwrite the same checkpoint.
I'll be more specific, what I want to do is create some checkpoints, but when you use "Game - Create campaign checkpoint" they won't overwrite they create another file. So if the player save for example: Checkpoints\checkpoint1.w3z the next time the player save the same checkpoint it'll be Checkpoints\checkpoint1(2).w3z the function won't overwrite the existing checkpoint. In that case, I want to check if the file exist delete it and create the new one. Apart of that, Ive tried to use "save and load or change" or "save game", with that functions it'll be overwrite, so i tested and in single maps (outside of campaign editor) it saves only ones (the next time won't save), and the other functions don't work by the uper reason. I've already solved:

  • CheckPoint1
    • Events
      • Unit - A unit enters CheckPoint01 <gen>
    • Conditions
      • ((Owner of (Entering unit)) is in ControllPlayers.) Equal to Verdadero
      • ((Entering unit) is A ground unit) Equal to Verdadero
    • Actions
      • Trigger - Turn off (This trigger)
      • -------- Se borra si existen partidas --------
      • Game - Delete the Checkpoints saved-game folder
      • Game - Create campaign checkpoint with name Checkpoints\Slot1\Checkpoint.w3z (Show checkpoint message)
      • Set VariableSet CopyA = Verdadero
      • Game - Display to (All players) the text: |cffd45e19Cargar de...
  • CheckPoint2
    • Events
      • Destructible - Puerta de piedra movediza (Horizontal 2) 6220 <gen> dies
    • Conditions
    • Actions
      • Trigger - Turn off (This trigger)
      • Game - Delete the Checkpoints\Slot2 saved-game folder
      • Game - Create campaign checkpoint with name Checkpoints\Slot2\Checkpoint.w3z (Show checkpoint message)
      • Set VariableSet CopyB = Verdadero
  • CheckPoint3
    • Events
    • Conditions
    • Actions
      • Trigger - Turn off (This trigger)
      • Game - Delete the Checkpoints\Slot3 saved-game folder
      • Game - Create campaign checkpoint with name Checkpoints\Slot3\Checkpoint.w3z (Show checkpoint message)
      • Set VariableSet CopyC = Verdadero
However, I wonder if the condition works because it always returned false
 
Last edited:
Level 4
Joined
Sep 27, 2018
Messages
61
Someone knows? Because in another map I have to check if the saved game exist:
  • LoadCheckpoint
    • Events
      • Player - Player 1 (Red) types a chat message containing checkpoint1 as An exact match
      • Player - Player 1 (Red) types a chat message containing checkpoint2 as An exact match
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Entered chat string) Equal to (checkpoint + 1)
        • Then - Actions
          • Game - Load Checkpoints\Slot1\Acto I - Azula.w3z (Skip scores)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (The Checkpoints\Slot1\Acto I - Azula.w3z saved-game exists) Equal to Falso
            • Then - Actions
              • Game - Display to (All players) the text: No existe partida
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Entered chat string) Equal to (checkpoint + 2)
        • Then - Actions
          • Game - Load Temp\Final.w3z (Skip scores)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (The Temp\Final.w3z saved-game exists) Equal to Falso
            • Then - Actions
              • Game - Display to (All players) the text: No existe partida
            • Else - Actions
 
Top