Reset Scene

nanygamesnanygames Member Posts: 41
edited May 2012 in Working with GS (Mac)
I have a problem with my game!
I have a draw line system and when I reset scene,the line don't reset.
Could someone Help me?

Comments

  • RPRP Member Posts: 1,990
    Sounds like you have some attributes that are retaining their values. Add some change behaviors that set those attributes back to their origional state in conjuction with the reset scene button. Or, emebed these somewhere on the scene on or off screen, so the first thing the scene does when it loads is reset those attributes to 0 etc.
  • nanygamesnanygames Member Posts: 41
    I Try do this ,but doesn't work,is there another way?
    I try to do the same system with true and false but the draw line don't reset.
  • patapplepatapple Member Posts: 873
    Can you explain us how you create the draw system? So we can help you to reset the scene ;)
  • nanygamesnanygames Member Posts: 41
    My button reset stay in another scene and all function in this scene reset ,but the line don't disappear for I draw again.I put all function in this scene to true and false,for restart but the line doesn't work.
    For the Draw Line System:
    Change Attribute:self.Rotation to VectorToAngle(game.Mouse.Position.X-game.Endpoint X,game.Mouse.Position.Y-game.Endpoint.Y
    Change Attribute:magnitude(game.Mouse.Position.X-game.Endpoint X,game.Mouse.Position.Y-game.Endpoint.Y
    Change Attribute:self.Position.X to game.Endpoint X + cos( self.Rotation )*Self.Size.Width /2
    Change Attribute:self.Position.y to game.Endpoint X + sin( self.Rotation )*Self.Size.Width /2
    Change Attribute:self.color.Alpha to 1
    Change Attribute:game.Endpoint X to game.Endpoint X + cos( self.Rotation )*Self.Size.Width
    Change Attribute:game.Endpoint Y to game.Endpoint Y+ sin( self.Rotation )*Self.Size.Width
  • nanygamesnanygames Member Posts: 41
    Thanks :D
  • EatingMyHatEatingMyHat Member Posts: 1,246
    Game attributes do not reset when you reset the scene... check there...
  • nanygamesnanygames Member Posts: 41
    Is there another way to I resolve this?
Sign In or Register to comment.