Reset scene

prajpraj Member Posts: 68
edited July 2012 in Working with GS (Mac)
i want to make a game such that when it hits the obstacle, it will change scene to you lost. and then can try again. However, when i set a rule that says- if ball collides with wall, destroy actor and change scene to reset game, nothing happens. only ball is destroyed. Did i do something wrong?

Answers

  • guillefaceguilleface Member Posts: 1,014
    i think you are destroying the actor first, so it no longer triggers the rules after is destroyed. i am not so sure but check that first.
  • prajpraj Member Posts: 68
    Nothing is happening. This is starting to get extremely annoying. Dont tell me it is one of the many irritating bugs in this creator.....
  • prajpraj Member Posts: 68
    X(
  • prajpraj Member Posts: 68
    edited July 2012
  • rommaromma Member Posts: 114
    Add a simple timer to your change scene. Also, I wouldnt change scene just for "you lost", Just make an actor with the text and set alpha to 0, when ball collides with wall, destroy ball and change self.alpha of the "lost" actor to 1.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited July 2012
    @praj, you took an answer that was correct and rejected it and then threatened to leave and go use stencyl. You'll find that -- if you're patient and willing to try suggested solutions -- this is a very helpful community. If you aren't, then perhaps stencyl is a better tool for you.

    Programming of any kind requires an understanding of logic. In this case, your actor's logic is as follows:

    1. Did I collide with a wall?
    .....Yes: a. Destroy me
    ............b. Change to a different scene

    Actors can only run their rules/behaviors when they are in a scene. If you never place an actor on a scene OR if you destroy an actor and remove it from a scene, its rules will not run. So, in 1a above, you destroy your actor. The behavior in 1b will never run. If you want it to work, you have to switch the order of 1a and 1b so that the destroy behavior is at the end.

    If you've tried that and it isn't working, then post a screenshot of your rules and we can help you get it working right.

    Finally, expecting an answer within 30 minutes is unrealistic. Sometimes, you'll luck out and someone will answer right away, but getting an answer within 24 hours is a much more realistic expectation.

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

  • prajpraj Member Posts: 68
    ok. i was a bit angry but none of them worked. so i just added a button. prob. can cause trouble as everytime actor dies u have to self click reset.
  • prajpraj Member Posts: 68
    ho to insert image?
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited July 2012
    Use < img src="http://image.com"> but replace the http URL with a hosted image URL (e.g. dropbox, imageshack, etc.).

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

Sign In or Register to comment.