Posted: 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
Zampano
Posted: 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
Posted: 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
Posted: 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
Posted: Fri Dec 21, 2007 1:13 am Post subject: Re: How to add a score in my game
thanks alot guys lol
Sean
Posted: 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.