• 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.

Gold mining wins or loses

Status
Not open for further replies.
Level 5
Joined
Mar 7, 2024
Messages
79

need your help creating an event on the test map, clicking on an NPC character has a 40% chance of receiving 1000 gold, the required cost is 1 click costs 500 gold, the player must have over 500 gold, the Can you help me?
 
Last edited:

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,877
Just by clicking on the unit? The sounds incredibly frustrating for new players, lol.

Anyway, here you go:
  • Gold On Selection
    • Events
      • Player - Player 1 (Red) Selects a unit
      • Player - Player 2 (Blue) Selects a unit
      • Player - Player 3 (Teal) Selects a unit
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Footman
      • ((Triggering player) Current gold) Greater than or equal to 500
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 100) Less than or equal to 40
        • Then - Actions
          • Player - Add 500 to (Triggering player).Current gold
        • Else - Actions
          • Player - Add -500 to (Triggering player).Current gold
Note that this design doesn't spend any gold if you win.

But you can modify it to always spend 500 gold if that's important to you:
  • Gold On Selection
    • Events
      • Player - Player 1 (Red) Selects a unit
      • Player - Player 2 (Blue) Selects a unit
      • Player - Player 3 (Teal) Selects a unit
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Footman
      • ((Triggering player) Current gold) Greater than or equal to 500
    • Actions
      • Player - Add -500 to (Triggering player).Current gold
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 100) Less than or equal to 40
        • Then - Actions
          • Player - Add 1000 to (Triggering player).Current gold
        • Else - Actions
Add all of your Players to the Events and replace Footman with your desired Unit-Type.
 
Level 5
Joined
Mar 7, 2024
Messages
79
Just by clicking on the unit? The sounds incredibly frustrating for new players, lol.

Anyway, here you go:
  • Gold On Selection
    • Events
      • Player - Player 1 (Red) Selects a unit
      • Player - Player 2 (Blue) Selects a unit
      • Player - Player 3 (Teal) Selects a unit
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Footman
      • ((Triggering player) Current gold) Greater than or equal to 500
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 100) Less than or equal to 40
        • Then - Actions
          • Player - Add 500 to (Triggering player).Current gold
        • Else - Actions
          • Player - Add -500 to (Triggering player).Current gold
Note that this design doesn't spend any gold if you win.

But you can modify it to always spend 500 gold if that's important to you:
  • Gold On Selection
    • Events
      • Player - Player 1 (Red) Selects a unit
      • Player - Player 2 (Blue) Selects a unit
      • Player - Player 3 (Teal) Selects a unit
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Footman
      • ((Triggering player) Current gold) Greater than or equal to 500
    • Actions
      • Player - Add -500 to (Triggering player).Current gold
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 100) Less than or equal to 40
        • Then - Actions
          • Player - Add 1000 to (Triggering player).Current gold
        • Else - Actions
Add all of your Players to the Events and replace Footman with your desired Unit-Type.
Thank you Thank you
 
Status
Not open for further replies.
Top