• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

How to put different difficulties in map?

Status
Not open for further replies.
Level 28
Joined
Jan 26, 2007
Messages
4,789
You can do this with a dialog menu.
Here is a tutorial for that: Basics of a Dialog.

So basically you need 3 dialog buttons.
If button 1 is pressed, then set difficulty to easy (change HP or add more lives or something).
If button 2 is pressed, then set difficulty to normal (usually you shouldn't change anything actually).
If button 3 is pressed, then set difficulty to hard (increase HP, reduce lives).

Edit: Oh, don't use "Map Initialization" by the way. Use "Time elapsed is 0.00 seconds" (dialogs cannot be shown at map init).
 
Level 5
Joined
Jan 5, 2012
Messages
116
It's kinda complicated. There are 3 main types of creeps that I want to decrease/increase max life (easy/hard) by 50 - They have 200, 250 and 300 hp.
Then there are the bosses that I want to decrease/increase max life (easy/hard) by 500 - They have 3000, 4000, 5000 hp.
Then there is a special type of unit(adds for the main boss) that I want to decrease/increase max life (easy/hard) by 200- They have 1000 hp.
However, I want the final boss (Devil) to remain as he is (10000 hp)
That's the thing I want. Hope it's easy to be implemented :)
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
It's kinda complicated. There are 3 main types of creeps that I want to decrease/increase max life (easy/hard) by 50.
Then there are the bosses that I want to decrease/increase max life (easy/hard) by 500.
Then there is a special type of unit(adds for the main boss) that I want to decrease/increase max life (easy/hard) by 200.
However, I want the final boss (Devil) to remain as he is.
That's the thing I want. Hope it's easy to be implemented :)
Oh, if it's a fixed value (instead of a percentage), then it becomes a bit easier.
Just go to the "abilities" tab in the object editor, copy "Item Life Bonus" in 'Special -> Items' a few times. then set the life to +XHP (change names accordingly).
Give the unit this ability when they spawn (if difficuly is hard).

If you want to decrease HP, you can either use SHIFT + click on the life-value of the item ability to set a negative amount of HP (will decrease the HP when added), or you could add a positive abilty as default and remove it when easy is chosen (if you remove a +HP ability, the HP will decrease :p).
 
Level 5
Joined
Jan 5, 2012
Messages
116
Hmm I did what you told me but it didn't do anything it was all like normal mode.
I use this trigger and run it when Easy button is clicked(Player 7 is the enemy):

  • Easy Trigger
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • (Owner of (Entering unit)) Equal to Player 7 (Green)
      • (Unit-type of (Entering unit)) Not equal to Demon Warlock
      • (Unit-type of (Entering unit)) Not equal to Doom Lord
      • (Unit-type of (Entering unit)) Not equal to Doom Revenant
      • (Unit-type of (Entering unit)) Not equal to Overlord
      • (Unit-type of (Entering unit)) Not equal to Skeleton Champion
      • (Unit-type of (Triggering unit)) Not equal to Devil
    • Actions
      • Unit - Add Creep Life Bonus (-50) to (Entering unit)
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Hmm I did what you told me but it didn't do anything it was all like normal mode.
I use this trigger and run it when Easy button is clicked(Player 7 is the enemy):

  • Easy Trigger
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • (Owner of (Entering unit)) Equal to Player 7 (Green)
      • (Unit-type of (Entering unit)) Not equal to Demon Warlock
      • (Unit-type of (Entering unit)) Not equal to Doom Lord
      • (Unit-type of (Entering unit)) Not equal to Doom Revenant
      • (Unit-type of (Entering unit)) Not equal to Overlord
      • (Unit-type of (Entering unit)) Not equal to Skeleton Champion
      • (Unit-type of (Triggering unit)) Not equal to Devil
    • Actions
      • Unit - Add Creep Life Bonus (-50) to (Entering unit)
And you're certain the Creep Life Bonus is also set to -50?
I just checked whether it was possible to decrease max HP this way, and it is.
If you change the value the 'normal' way, it will automatically set itself to 0 (instead of a negative number), so you have to Shift-click it.
 
Level 5
Joined
Jan 5, 2012
Messages
116
Yeah the values are alright, the problem is that even in hard difficulty creeps don't get the bonus hp so it isn't negative value problem. Maybe something wrong with the triggers?

  • Easy Button
    • Events
      • Dialog - A dialog button is clicked for MyDialog
    • Conditions
      • (Clicked dialog button) Equal to DialogButton[1]
    • Actions
      • Trigger - Run Easy Trigger <gen> (checking conditions)
      • Trigger - Run Easy Trigger 2 <gen> (checking conditions)
      • Trigger - Run Easy Trigger 3 <gen> (checking conditions)
      • Player Group - Pick every player in User_Players and do (Hero - Make (Picked player) Heroes gain 60.00% experience from future kills)
      • Game - Display to (All players) for 10.00 seconds the text: |cffff0000Easy|r mo...
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Oh, yeah... the triggers are wrong :p

You run Easy Trigger, which means that it skips the event. Thus there is no "entering unit", thus it won't do anything productive.

What you want to do is this:
  • Choose Game Mode
    • Events
      • Dialog - A dialog button is clicked for MyDialog
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to DialogButton[1]
        • Then - Actions
          • Set gameDifficulty = 1
          • Player Group - Pick every player in User_Players and do (Hero - Make (Picked player) Heroes gain 60.00% experience from future kills)
          • Game - Display to (All players) for 10.00 seconds the text: |cffff0000Easy|r mo...
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Clicked dialog button) Equal to DialogButton[2]
            • Then - Actions
              • Set gameDifficulty = 2
              • Player Group - Pick every player in User_Players and do (Hero - Make (Picked player) Heroes gain 80.00% experience from future kills)
              • Game - Display to (All players) for 10.00 seconds the text: |cffff0000Normal|r mo...
            • Else - Actions
              • Set gameDifficulty = 3
              • Player Group - Pick every player in User_Players and do (Hero - Make (Picked player) Heroes gain 100.00% experience from future kills)
              • Game - Display to (All players) for 10.00 seconds the text: |cffff0000Hard|r mo...
The trigger above is for all 3 game modes.
It uses an integer variable to set the game mode.

Now when a unit spawns:
  • Unit Spawned
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • (Owner of (Entering unit)) Equal to Player 7 (Green)
      • (Unit-type of (Entering unit)) Not equal to Demon Warlock
      • (Unit-type of (Entering unit)) Not equal to Doom Lord
      • (Unit-type of (Entering unit)) Not equal to Doom Revenant
      • (Unit-type of (Entering unit)) Not equal to Overlord
      • (Unit-type of (Entering unit)) Not equal to Skeleton Champion
      • (Unit-type of (Triggering unit)) Not equal to Devil
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • gameDifficulty Equal to 1
        • Then - Actions
          • Unit - Add Creep Life Bonus (-50) to (Entering unit)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • gameDifficulty Equal to 3
            • Then - Actions
              • Unit - Add Creep Life Bonus (+200) to (Entering unit)
            • Else - Actions
Something like that.
I don't know the exact values you wish to add, you can change that if you like :)
 
Status
Not open for further replies.
Top