Help needed! 3 Stars given based on time

OdenSoftwareOdenSoftware Member Posts: 34
edited May 2012 in Working with GS (Mac)
Hi I'm working on a game and I'm kinda new to this. I have looked around on the forum and found some really helpful stuff... but non of them have helped me enough.

As the title says i want 3 stars depending on how fast i can take me through the level.

Description:
I have a ball that i want to drag through the screen as fast as possible.
Lets make some time limits up. If I pass goal before 1 second 3 stars, if I pass goal before 2 second 2 stars and if I pass goal before 3 second I only get 1 star.

This stars i want to "spawn" on another scene.

I really need help, and if someone has time and energy to help me I would be blessed.

Either by sending me an template with this. - if so my mail is "fillip.sernhede@live.com"
Or u could answer me here on the forum, but if so please answer quite detailed with all attribute i have to make and so on...

Answers

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    I just have a Rule that says When game.timeElapsed < 1 then Change Attribute game.stars to 3; Otherwise When game.timeElapsed < 2 then Change Attribute game.stars to 2; Otherwise When game.timeElapsed < 3 then Change Attribute game.stars to 1.

    Another way would be to do Change (or Constrain) Attribute game.stars to 3-floor(game.timeElapsed).

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • OdenSoftwareOdenSoftware Member Posts: 34
    U may have the time to give me a template?
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Possibly, but have you tried the rule or the behavior I suggested?

    In addition, you would need either a replicate behavior set to game.stars or an image that changes based on the value of game.stars.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    @fliipes Here's a demo (the top star generator is what you asked for; I just was trying out the bottom one): https://www.dropbox.com/s/cahrpjxa4xrxsh1/stars DEMO.zip

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • OdenSoftwareOdenSoftware Member Posts: 34
    @tatiang thx for all i got almost everything now. The only thing i don't understand is how do i get the stars to pop up on another scene?
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    The demo I made is dependent on two game-level attributes, game.stars and game.timeElapsed. Both can be accessed from any scene. You can use a Change Scene behavior, a Pause Scene behavior, or just overlay a new "scene" by changing the position of a scene-sized (or slightly smaller) image that appears over the current scene and then spawns/repositions/replicates the correct number or stars.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • OdenSoftwareOdenSoftware Member Posts: 34
    I don't understand exactly. I want the stars to appear on another scene when i go into goal!
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited May 2012
    What have you tried so far?

    What I was saying is that you can spawn stars on any scene you want. Have you made a new scene and added an actor to spawn/replicate stars based on the value of game.stars or game.timeElapsed? You can then have your current scene either Change Scene or Pause Game to display the new scene with the star spawner.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • OdenSoftwareOdenSoftware Member Posts: 34
    not really
  • OdenSoftwareOdenSoftware Member Posts: 34
    i maen i dont understand pause behavior
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • OdenSoftwareOdenSoftware Member Posts: 34
    i will try this sooner today have to go to school now, I'll get back to u if i can't figure this out !
  • OdenSoftwareOdenSoftware Member Posts: 34
    @tatiang thx i understand it all now just now quick question.

    How do I make the stars stay at the biggest amount?
    Don't know if u understand what i mean but when my ball goes into goal it pops up, lets say 2 stars and i want those to stay even if i try again and fail and only gets 1 star.

    Hope u understand couse i really need this to work :)
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Add a an attribute game.Level1MaxStars or something like that. You can also use writeable tables to avoid having so many attributes to deal with. Anyway, at the end of a level do When game.Level1Stars > game.Level1MaxStars, Change Attribute game.Level1MaxStars to game.Level1Stars.

    There are lots of helpful videos about how to do this sort of thing: http://www.google.com/search?client=safari&rls=en&q=high+score+gamesalad&ie=UTF-8&oe=UTF-8

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • OdenSoftwareOdenSoftware Member Posts: 34
    I have tried that now but it didn't save the amount of stars.
    I can get 3 stars first round and when i do a bad round the stars change to a lower number.
  • OdenSoftwareOdenSoftware Member Posts: 34
    edited June 2012
    Hey i need some help with my 3 star system.
    I have got the star system to work without the saving thing.

    When i go into goal before 3 seconds i get 3 stars. I want these stars to remain there even if I next round will fail totally and just get one stars.

    Hope u understand what i mean and i really need the help. THX ! :)
  • creativeappscreativeapps Member Posts: 1,770
    Wait for few days @tshirtbooth will release save score and star systems with read and writable tables and it will increase the smoothness of you game and lot other things make it easy

    Thanks,
    John
  • Dazza006Dazza006 Member Posts: 248

    Take a look at tshirtbooths video



  • OdenSoftwareOdenSoftware Member Posts: 34
    U know the exact date he will release it or just know it will be soon? @creativeapps @tshirtbooth

    And @Dazza006 have seen that clip and it helped me a little but still not working...
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited June 2012
    You did this?

    When game.Level1Stars > game.Level1MaxStars, Change Attribute game.Level1MaxStars to game.Level1Stars

    Can I see your rules?

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • creativeappscreativeapps Member Posts: 1,770
    @Dazza006 thanks for the video but its old one now we can do that better way with tables.

    @fliipes not sure about release date
  • OdenSoftwareOdenSoftware Member Posts: 34
    Yes i have, i thought i worked but it dident, if u got time please send me a template. I really apreciate ur time :)
  • OdenSoftwareOdenSoftware Member Posts: 34
    Whats tables? @creativeapps
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    I'll need to see a screenshot of your rules or a link to your project file in order to help you further.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • OdenSoftwareOdenSoftware Member Posts: 34
    Really helpful @tshirtbooth tho i cant get it to work on mine. The difference between ours is that i make the stars viseble instead of me just seeing the number. And i get stars depending on how many i touch instead i have a time limit..

    @tatiang Can u please help me as well?
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    I'll need to see a screenshot of your rules or a link to your project file in order to help you further.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • creativeappscreativeapps Member Posts: 1,770
    Thanks @tshirtbooth. Great work as always..:)
  • OdenSoftwareOdenSoftware Member Posts: 34
    Soo i have pm it to u now
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited June 2012
    I think part of the problem is that you're changing the scene to world 1 when you complete the level, but then you have other actors on the LVL 1 scene with rules that are set to When game.Level complete is true. Those rules aren't going to run because you've already changed the scene. You might need to rethink how/when you change the scene, or just move those actors/rules to the world 1 scene so that they actually are triggered when the level is completed.

    As an example, I added a Log Debugging Statement ("Got here") to your Round rules actor and it never showed up in the Debugger window:

    image

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • OdenSoftwareOdenSoftware Member Posts: 34
    what i don't understand
Sign In or Register to comment.