Final score based on time and stars collect - best method?
jigglybean
Member Posts: 1,584
Hi all,
I wanted to add a score system based on time taken to complete a level. Faster completion = high score, plus points for collecting 1-3 stars a level.
I was wondering what the best method would be of achieving this, and using maybe a table to store the score and stars(which I think I have figured out already).
thanks
G
Like Balls? Then click here! We've 100 coming soon
Best Answer
-
jsorr2 Posts: 279
When a new scene is entered, every actor has a self timer. You can find this if you click the actor and then click 'time'. So perhaps in one of the actors that's in a particular level, log the self.time of that actor into a table.
Then when the level is completed, have a rule somewhere:
- if table value (wherever you put self.time) < (less than) 30 (30 seconds)
- then
- change table value (star amount = 3).
- change attribute score (score = table value (self.time)*5).
- change table value (score = 50 (or something).
- save table.
- if table value > 30.
- if table value < 60.
- change table value (star amount = 2).
- save table.
etc.
Hope that helps.
Answers
http://www.mediafire.com/download/jgaaf450r8bm09q/scoreSystem.zip
I made a template for you as my instructions weren't very clear. Hope it helps!
Wonderful thanks ever so much
Like Balls? Then click here! We've 100 coming soon