Jump to content


Photo

2 Players - 2 Scores


  • Please log in to reply
6 replies to this topic

#1 bmartin376

bmartin376

    GMC Member

  • GMC Member
  • 30 posts
  • Version:Unknown

Posted 02 November 2008 - 02:11 AM

Hi, I have this cricket dart game. I have 2 players which can get extra points. How can I set the game to place the scores in the right place. I have obj_score1 and obj_score2. I have set up player 1 name and player 2 name both with a seperate controller. The name controller works great. I would like to have a turn base game but I have tried and can't make it work. So I'm trying to make this as easy as I can. Can someone help with the scoring and turn base. I will give credit if I can get this to work. Thank you
  • 0

#2 Zeop

Zeop

    GMC Member

  • New Member
  • 192 posts

Posted 02 November 2008 - 02:19 AM

I'm feeling generous today.

//Draws player 1 score.
draw_text(0,0,"Player 1 score: "+string( [INSET PLAYER 1 SCORE VARIABLE]   ))
//Draw player 2 score.
draw_text(view_wview[0]-string_width("Player 2 score: "+string(  INSET PLAYER 2 SCORE VARIABLE]  )),0,"Player 2 score: "+string(   INSET PLAYER 2 SCORE VARIABLE]   ));

Edited by Zeop, 02 November 2008 - 02:20 AM.

  • 0

#3 osl

osl

    GMC Member

  • New Member
  • 143 posts

Posted 02 November 2008 - 11:39 AM

Create an obj_controller, no need for any sprite, it just needs to be in the certain room. Then create a create event and type this code in.
globalvar score1;
globalvar score2;

And every time the ball collides with the goal, or bonus, put this in a collision event.

If player 1 scores or earns points
score1+=[Number of points]
Or if player 2 scores or earns points
score2+=[Number of points]

I hope this helps, I'm using it in my new game

Edited by osl, 02 November 2008 - 11:40 AM.

  • 0

#4 bmartin376

bmartin376

    GMC Member

  • GMC Member
  • 30 posts
  • Version:Unknown

Posted 02 November 2008 - 12:38 PM

Create an obj_controller, no need for any sprite, it just needs to be in the certain room. Then create a create event and type this code in.

globalvar score1;
globalvar score2;

And every time the ball collides with the goal, or bonus, put this in a collision event.

If player 1 scores or earns points
score1+=[Number of points]
Or if player 2 scores or earns points
score2+=[Number of points]

I hope this helps, I'm using it in my new game

The game is on the same computer played at the same time. Extra scoring is set up with left mouse click. How can I assign objects to a certain player?
  • 0

#5 joninator_7

joninator_7

    GMC Member

  • New Member
  • 4 posts
  • Version:Unknown

Posted 06 January 2012 - 01:53 AM

i made a man called pacman yellow and a man called pacman red, they each need a score for when they collide with an object so i tried osl's idea

Edited by joninator_7, 06 January 2012 - 02:23 AM.

  • 0

#6 joninator_7

joninator_7

    GMC Member

  • New Member
  • 4 posts
  • Version:Unknown

Posted 06 January 2012 - 02:18 AM

Create an obj_controller, no need for any sprite, it just needs to be in the certain room. Then create a create event and type this code in.

globalvar score1;
globalvar score2;

And every time the ball collides with the goal, or bonus, put this in a collision event.

If player 1 scores or earns points
score1+=[Number of points]
Or if player 2 scores or earns points
score2+=[Number of points]

I hope this helps, I'm using it in my new game

this didnt work for me, why?
can you help??
  • 0

#7 DarkJoltGaming

DarkJoltGaming

    GMC Member

  • GMC Member
  • 31 posts
  • Version:Unknown

Posted 07 September 2014 - 12:33 AM

none of thoses examples worked for me to :(


  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users