Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 How to add a score in my game
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
shadox321




PostPosted: Thu Dec 20, 2007 3:27 pm   Post subject: How to add a score in my game

i was wondering if anyone could tell me how to add a score to my game every time the bullet hits the left side of the screen. if you can help that would be great
Sponsor
Sponsor
Sponsor
sponsor
Zampano




PostPosted: Thu Dec 20, 2007 3:37 pm   Post subject: Re: How to add a score in my game

What you need is a simple variable which adds a set amount to itself each time the bullet hits the left side of the screen.
code:
if bulletx>maxx then
score:=score+1
end if
HeavenAgain




PostPosted: Thu Dec 20, 2007 5:12 pm   Post subject: RE:How to add a score in my game

left side, not right Zampano, maxx is the far right side :p
0 is left
Zampano




PostPosted: Thu Dec 20, 2007 5:27 pm   Post subject: Re: How to add a score in my game

Doh!

That's exactly the kind of mistake I make a lot while programming.
shadox321




PostPosted: Fri Dec 21, 2007 1:13 am   Post subject: Re: How to add a score in my game

thanks alot guys lol
Sean




PostPosted: Fri Dec 21, 2007 2:22 pm   Post subject: Re: How to add a score in my game

Zampano @ Thu Dec 20, 2007 3:37 pm wrote:
What you need is a simple variable which adds a set amount to itself each time the bullet hits the left side of the screen.
code:
if bulletx>maxx then
score +=1
end if


Just to make it simple..

Twisted Evil
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 6 Posts ]
Jump to:   


Style:  
Search: