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

Status
Not open for further replies.
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
 
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!
 
This action:
Bounty-3.png
 
  • 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!
 
  • 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.
Back
Top