Give Stars On Time

creativeappscreativeapps Member Posts: 1,770
edited November -1 in Working with GS (Mac)
In my game I dont have any stars which my actor have to collect. I want to give maximum 3 stars.
How do I give stars on time base? if yes how do I calculate that? Please let me know.

Comments

  • creativeappscreativeapps Member Posts: 1,770
    How do I create this rules.
    Suppose Car coming from left side and its collide with petrol tank and blast.

    1) Duration on car with collide with petrol tank is less then 5 seconds that time I want to give 1 star, and between 5-10 seconds I want to give 2 stars and more then 10 seconds I want to give 3 stars

    2) After level complete I want to display those stars on level complete screen and in levels screen.

    3) Also suppose first time I got 3 stars in 1st level and when I am playing that level again and if I got 2 stars it will consider best game play only means display 3 stars in levels and showing 2 stars in level complete screen.

    Please help me out.
  • creativeappscreativeapps Member Posts: 1,770
    anyone?
  • creativeappscreativeapps Member Posts: 1,770
    is that possbile to do? and how? please guide
  • creativeappscreativeapps Member Posts: 1,770
    please help me out I am stuck in this part. And in weekend only I am getting time to work on my project. Pleasee
  • DrGlickertDrGlickert Member Posts: 1,135
    So you want to award stars based on the time of the level?

    I would make 2 real attributes (game.LevelTime, game.FinalTime). When the player starts do a change attribute;

    Change Attribute game.LevelTime to game.Time

    When level is over, Change attribute Game.FinalTime to game.Time-game.LevelTime

    This will give you the amount of time it took the player to finish the level or scene.

    If you're wanting this to be based on each actor that it collides with, then put that change attribute on each actor.
  • creativeappscreativeapps Member Posts: 1,770
    thanks let me try and I will get back to you
  • creativeappscreativeapps Member Posts: 1,770
    some how its not working please read my 2nd post what I want to do is read below:

    ------------------------------------------------------------------------------

    How do I create this rules.
    Suppose Car coming from left side and its collide with petrol tank and blast.

    1) Duration on car with collide with petrol tank is less then 5 seconds that time I want to give 1 star, and between 5-10 seconds I want to give 2 stars and more then 10 seconds I want to give 3 stars

    2) After level complete I want to display those stars on level complete screen and in levels screen.

    3) Also suppose first time I got 3 stars in 1st level and when I am playing that level again and if I got 2 stars it will consider best game play only means display 3 stars in levels and showing 2 stars in level complete screen.

    Please help me out.
  • DrGlickertDrGlickert Member Posts: 1,135
    Let's see if I can explain it better for you.

    We'll do it slightly differently.
    Create a game.attribute that's an integer; call it game.Level1Stars
    Use two real attributes on the car. One called self.LevelTime and one called self.FinishTime (or call it whatever you want).

    Have a change attribute on the car;
    Change Attribute self.LevelTime to game.Time

    Use a rule;
    When car collides/overlaps with petrol tank
    Change Attribute; game.FinishTime to game.Time-self.LevelTime
    Rule (within the above rule)
    If self.LevelTime is < 5 then DO BEHAVIORS FOR GIVING ONE STAR.
    Change Attribute game.Level1Stars to 1
    Rule: above top rule, but not within above rule;
    If self.levelTime is > 5 & < 10 then DO BEHAVIORS FOR GIVING TWO STARS
    Change Attribute game.Level1Stars to 2
    Rule: in top rule, but not within above two rules;
    If self.LevelTime > 10 then DO BEHAVIORS FOR GIVING THREE STARS
    Change Attribute game.Level1Stars to 3

    The BEHAVIORS FOR STARS are up to you. They could be display image, the could actually relate specifically to a game.attribute (as I've detailed above).

    If you want to drop some money, go over to gshelper.com and TShirtBooth is selling a template specifically for the "Star awards"

    Based on above, for number 3), put in additional rules. On the Rules add a line in the rule identifier such as; If self.levelTime > 5 & < 10 & game.Level1Stars is NOT < 2
  • creativeappscreativeapps Member Posts: 1,770
    thanks a lot dr let me do this and I will get back to you. thanks
  • DrGlickertDrGlickert Member Posts: 1,135
    Sure thing boss. Hopefully this will work for you.
Sign In or Register to comment.