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
Do you have good ideas for new contests? If so, please open new threads in the Contest Submission sub-forum to discuss them.
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

[Trigger] Importing difficulty levels?

Discussion in 'Triggers & Scripts' started by LordPerenoldeII, Aug 16, 2015.

  1. LordPerenoldeII

    LordPerenoldeII

    Joined:
    Nov 20, 2005
    Messages:
    879
    Resources:
    2
    Maps:
    2
    Resources:
    2
    I'm playing my own campaign at Hard mode, but when i win a map and go to the next one the game is back to normal difficulty. Any way to carry-over hard mode?
     
  2. Maker

    Maker

    Joined:
    Mar 6, 2006
    Messages:
    9,181
    Resources:
    17
    Maps:
    2
    Spells:
    14
    Tutorials:
    1
    Resources:
    17
    Try these.

    Store the difficulty:
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Difficulty level) Equal to Easy
      • Then - Actions
        • Game Cache - Store 0 as 0 of Difficulty in (Last created game cache)
      • Else - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Difficulty level) Equal to Normal
          • Then - Actions
            • Game Cache - Store 1 as 0 of Difficulty in (Last created game cache)
          • Else - Actions
            • Game Cache - Store 2 as 0 of Difficulty in (Last created game cache)


    Load and set the difficulty:
    • Custom script: call SetGameDifficulty(ConvertGameDifficulty(GetStoredInteger(bj_lastCreatedGameCache, "Difficulty", "0")))


    Look for a game cache tutorial.
     
  3. LordPerenoldeII

    LordPerenoldeII

    Joined:
    Nov 20, 2005
    Messages:
    879
    Resources:
    2
    Maps:
    2
    Resources:
    2
    Good. I'll try these out asap. In the mean time +rep.

    It works!! It's amazing and so simple! Thank you!
     
    Last edited by a moderator: Aug 17, 2015
  4. LordPerenoldeII

    LordPerenoldeII

    Joined:
    Nov 20, 2005
    Messages:
    879
    Resources:
    2
    Maps:
    2
    Resources:
    2
    Sorry for double post but it seems now the only way to switch back difficulty is playing the campaign from the first mission. If you have any idea to fix this, please, it would be nice. In the mean time i'll try something on my own.
     
  5. LordDz

    LordDz

    Joined:
    May 11, 2007
    Messages:
    4,305
    Resources:
    0
    Resources:
    0
    Add an option dialogue in each map that allows you to set the difficulty.
    Isn't there a "change difficulty" option when you get the defeat message?
     
  6. LordPerenoldeII

    LordPerenoldeII

    Joined:
    Nov 20, 2005
    Messages:
    879
    Resources:
    2
    Maps:
    2
    Resources:
    2
    Of course there is. Is there a way to set that even after victory??
    And yeah, now that i managed to carry-over difficulty level in this way i think i'll try to implement the option dialogue box, as i was trying to do in the first place.
    I'll be in touch for updates. In the mean time if any of you has any other idea, feel free to share.

    EDIT: on the contrary, this will force me to completely remove selectable diff level pre-campaign, but who cares. As long as difficulty can still be chosen in this way...
     
  7. LordDz

    LordDz

    Joined:
    May 11, 2007
    Messages:
    4,305
    Resources:
    0
    Resources:
    0
    Okay, tested around in a test campaign.
    Play the first map and type win

    The difficulty will reset back to the CAMPAIGN DIFFICULTY YOU HAVE SELECTED FOR THE ORIGINAL CAMPAIGNS. So if you have selected hard in the original campaigns, it will revert to hard.

    So I guess you have to tell people to select the normal/hard difficulty in the campaign screen before playing your campaign through the custom campaigns screen :D

    Also.. I managed to get a really wierd bug, in map two, if you click the Menu->Escape->Menu after the game difficulty is displayed, you can get yourself a disconnect. In a single player game.
     

    Attached Files:

  8. LordPerenoldeII

    LordPerenoldeII

    Joined:
    Nov 20, 2005
    Messages:
    879
    Resources:
    2
    Maps:
    2
    Resources:
    2
    lol omg wtf?
    Anyways, i decided to stick with the dialogue buttons idea. Bothersome, as i have to delay the release of my update for at least another week, but at least it's functional.
    Thank you anyway for the further support.