Pacman like game problem.

Non-platform specific questions.

Pacman like game problem.

Postby Slickeroo » Thu Jul 05, 2007 4:25 pm

I have created a game where you are a Pacman type of character, except there are no ghosts. You run around and grab small peace symbols before the time runs out. You start out with 60 seconds and it decreases by 5 seconds every level.

The timer works, but could someone tell me how to make it count down?

Also, how can I have it so when all the peace symbols are gone the timer is stopped?

Please try to answer in events and not code, but either would be helpful.
I never have the money for anything...
Slickeroo
 
Posts: 3
Joined: Thu Jul 05, 2007 3:40 pm
Score: 0 Give a positive score

Re: Pacman like game problem.

Postby makslane » Thu Jul 05, 2007 11:17 pm

Slickeroo wrote:The timer works, but could someone tell me how to make it count down?


Create a count variable and, in the timer event put:
Code: Select all
count--;


In some event, like Create Actor event, initialize the count:

Code: Select all
count = 10;


[quote]Also, how can I have it so when all the peace symbols are gone the timer is stopped?[quote]

Count the peace actors, when reach to zero, destroy the timer.
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest