How do I get "Player or CPU to win 2 rounds"?

1 favourites
From the Asset Store
Players follower. use it for anything which follows the player
  • the bellow example should give u an idea on how the scoring should work. now i made it so it scores on tap, but u can make it when health of player =0 or enemy health = 0 then u give it a point to opposite team. whenever a side has 2 wins then the game is won and resets or it can go to the next enemy. resetting the game round u basically reset the layout. but with the current scoring u don't reset the global variables ever, unless u go to a new battle enemy then u can reset them either all together or just the specific ones that keeps stage scoring like in this case enemy wins /players wins counts for that specific stage.

    now i set it so is max 2 rounds but u can set it to 4 or 3 or N number .

    from here on making those round bubbles appear u just need to create them based on how many wins each side has.

    so if player has 1 or 2 wins you create a sprite with that round shape give it a frame u like to have place it in the screen make sure u destroy it on start of layout. then u create that sprite based on player wins. at a specific position

    so if player has 1 win create bubleround at x0 y 60 if player has 2 wins create buble round at x bubleroundwidth*bubblecount+bublewidth/2 y 60 and so on

    same goes for enemy.

    example scoring

  • Make a new variable called player_overall_score. Make another called CPU_overall_score.

    Make another variable called round.

    If playerScore = 7, add 1 to player_overall_score and add 1 to round.

    Do the same but with CPU score variables.

    If player_overall_score > CPU_overall_score and round > 3, run player win code. Do the same but opposite so that the CPU can win.

    Does that fix it?

  • Thank you very much, best advice on this yet. I will surely indeed try this. I some what understand your example of the scoring. I will continue to look more at it so I can process it and understand it more. But thank you once, again, I feel now that someone finally gets what im trying to do. Im still at beginner level of Construct, however I have a great burning passion of trying to make a great game and bringing it to life . I'll give an update on this as soon as I can.

  • Okay, so I working on incorprating the example you gave me into my project, I got confused, so i went and made a "test" project of the example you showed me Gamecorpstudio. I used however Vincent advice also. So I have a better understanding on the example ,however when ever a person wins on mine "test" example the scores reset and not let them get a chance to even win. Can you explain what I did wrong? It's look exactly like your but with Vincent's example on it.

    dropbox.com/s/3vz1x59muv579mk/Test.c3p

  • Okay, so I working on incorprating the example you gave me into my project, I got confused, so i went and made a "test" project of the example you showed me Gamecorpstudio. I used however Vincent advice also. So I have a better understanding on the example ,however when ever a person wins on mine "test" example the scores reset and not let them get a chance to even win. Can you explain what I did wrong? It's look exactly like your but with Vincent's example on it.

    https://www.dropbox.com/s/3vz1x59muv579mk/Test.c3p?dl=0

    Event 6 is always true it keeps resetting Global variable every 2 secs, also you comparing against a "strings" you should compare against a "Number" as you use Numbers there other ways it will be always true and it will keep resetting everything

  • OOOHHHH, Alright, got it. Thank you for that. I feel like I can get the hang of it now. Thank yall for the help and support.

  • Update:

    OH MY GOSH! THANK YALL SO MUCH FOR THE HELP! IT WORKS!!!! I COULD OF NEVER DONE IT WITHOUT YALL ASSITANCE AND EXAMPLE! THIS WAS ONE OF THE HUGEST THING THAT KEPT ME FROM FINISHING UP MY PROJECT. NOW I CAN FINALLY MOVE ON AND FINISH UP THE REST! THANK YOU,THANK YOU, THANK YOU!!!!!!!!!!!!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • YEEEEEESSS! Glad it worked! Let us know when you post it!

  • Hey guys, finally completed the game! It's playable on NEWGROUNDS if you like to check it out! Be sure to give it a great rating and feedback!

    newgrounds.com/portal/view/728788

  • Awesome!

    It turned out nicely!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)