• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Gold mining wins or loses

Level 4
Joined
Mar 7, 2024
Messages
47

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 64
Joined
Aug 10, 2018
Messages
6,589
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 4
Joined
Mar 7, 2024
Messages
47
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
 
Top