• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Tower defence - live shop?

Status
Not open for further replies.
Level 14
Joined
Aug 8, 2010
Messages
1,022
Hi! for my TD i can't make live shop , i mean i can but i have problem with the gold - i can't set how much gold it takes for an amount of lives here are my triggers : Trigger 1
  • Live Shop DBandD design
    • Events
      • Player - Player 1 (Red) types a chat message containing -live shop as An exact match
      • Player - Player 2 (Blue) types a chat message containing -live shop as An exact match
      • Player - Player 3 (Teal) types a chat message containing -live shop as An exact match
    • Conditions
    • Actions
      • Dialog - Clear liveShop
      • Dialog - Change the title of MyDialog to Live Shop
      • Dialog - Create a dialog button for liveShop labelled 4 lives for 500 gol...
      • Set DialogButton[1] = (Last created dialog Button)
      • Dialog - Create a dialog button for liveShop labelled 10 lives for 1000 g...
      • Set DialogButton[2] = (Last created dialog Button)
      • Dialog - Create a dialog button for liveShop labelled 25 lives for 2000 g...
      • Set DialogButton[3] = (Last created dialog Button)
      • Dialog - Create a dialog button for liveShop labelled 55 lives for 4000 g...
      • Set DialogButton[4] = (Last created dialog Button)
      • Dialog - Show liveShop for (Triggering player)
Trigger 2
  • Live Shop 500G4L
    • Events
      • Dialog - A dialog button is clicked for liveShop
    • Conditions
      • (Clicked dialog button) Equal to DialogButton[1]
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering player) Current gold) Greater than or equal to 500
        • Then - Actions
          • Player - Set (Triggering player) Current gold to -500
          • Set Lives = (Lives + 4)
          • Leaderboard - Change the value for Player 1 (Red) in (Last created leaderboard) to Lives
        • Else - Actions
          • Game - Display to (All players) the text: Not enough gold!
Trigger 3
  • Live Shop 1000G10L
    • Events
      • Dialog - A dialog button is clicked for liveShop
    • Conditions
      • (Clicked dialog button) Equal to DialogButton[2]
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering player) Current gold) Greater than or equal to 1000
        • Then - Actions
          • Player - Set (Triggering player) Current gold to -1000
          • Set Lives = (Lives + 10)
          • Leaderboard - Change the value for Player 1 (Red) in (Last created leaderboard) to Lives
        • Else - Actions
          • Game - Display to (All players) the text: Not enough gold!
Help me! +rep for the one who help me! :) :thumbs_up:
 
Level 3
Joined
Aug 17, 2010
Messages
33
Instead of using this:
  • Actions
    • Player - Set (Triggering player) Current gold to -1000
Then do this by using Arithmetics:
  • Actions
    • Player - Set (Triggering player) Current gold to (((Triggering player) Current gold) - 1000)
Please tell me if there is something you dont understand :)
 
Status
Not open for further replies.
Top