Page 1 of 1

Pacman like game problem.

PostPosted: Thu Jul 05, 2007 4:25 pm
by Slickeroo
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.

Re: Pacman like game problem.

PostPosted: Thu Jul 05, 2007 11:17 pm
by makslane
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.