• 🏆 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!

Making a map based on Clash Royale and i need help with...

Status
Not open for further replies.
Level 14
Joined
Nov 30, 2013
Messages
926
Turn on the flag about bounty which can be found on any Player Action (Trigger).

Make an Integer-array variable that counts the number of building destroyed per Players.
Example:
Code:
if (PlayerKill[0] > PlayerKill[1] ) then //If Player 1's kills is greater than Player 2's.
   //Player 1 wins the game.
else
   //Player 2 wins the game.
endif
 
Level 7
Joined
Mar 6, 2014
Messages
203
Do like this
  • Bounty
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Player - Turn Gives bounty On for Player 1 (Red)
      • Player - Turn Gives bounty On for Player 2 (Blue)
      • Player - Turn Gives bounty On for Player 3 (Teal)
      • Player - Turn Gives bounty On for Player 4 (Purple)
      • Player - Turn Gives bounty On for Player 5 (Yellow)
      • Player - Turn Gives bounty On for Player 6 (Orange)
      • Player - Turn Gives bounty On for Player 7 (Green)
      • Player - Turn Gives bounty On for Player 8 (Pink)
      • Player - Turn Gives bounty On for Player 9 (Gray)
      • Player - Turn Gives bounty On for Player 10 (Light Blue)
      • Player - Turn Gives bounty On for Player 11 (Dark Green)
      • Player - Turn Gives bounty On for Player 12 (Brown)
  • Win
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Castle
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Triggering unit)) Equal to Player 1 (Red)
        • Then - Actions
          • Game - Victory Player 2 (Blue) (Show dialogs, Show scores)
          • Game - Defeat Player 1 (Red) with the message: Defeat!
        • Else - Actions
          • Game - Victory Player 1 (Red) (Show dialogs, Show scores)
          • Game - Defeat Player 2 (Blue) with the message: Defeat!
 
Level 14
Joined
Nov 30, 2013
Messages
926
This action:
Bounty-3.png
 
Level 14
Joined
Nov 30, 2013
Messages
926
  • Try setting (Owner of <unit>) into (Owner of (Dying Unit) ).
  • Try removing the conditions at the Main Condition. You don't need it since the event only looks for 2 units when it destroyed.
  • Try changing the conditions at the If/Else statement into this.
    • If - Conditions
      • (Owner of (Dying Unit)) is Equal to Player 1
    • Then - Actions
      • Game - Victory Player 2 (Blue) (Show dialogs, Show scores)
      • Game - Defeat Player 1 (Red) with the message: Defeat!
    • Else - Actions
      • Game - Victory Player 1 (Red) (Show dialogs, Show scores)
      • Game - Defeat Player 2 (Blue) with the message: Defeat!
 
Level 3
Joined
Apr 10, 2016
Messages
17
  • Try setting (Owner of <unit>) into (Owner of (Dying Unit) ).
  • Try removing the conditions at the Main Condition. You don't need it since the event only looks for 2 units when it destroyed.
  • Try changing the conditions at the If/Else statement into this.
    • If - Conditions
      • (Owner of (Dying Unit)) is Equal to Player 1
    • Then - Actions
      • Game - Victory Player 2 (Blue) (Show dialogs, Show scores)
      • Game - Defeat Player 1 (Red) with the message: Defeat!
    • Else - Actions
      • Game - Victory Player 1 (Red) (Show dialogs, Show scores)
      • Game - Defeat Player 2 (Blue) with the message: Defeat!
It worked! Thanks!
 
Status
Not open for further replies.
Top