GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

How do I make an actor go back to the start without resetting the timer?

pe6169pe6169 Posts: 3Member
edited August 2012 in Working with GS (PC)
Thanks ... Paul

Best Answer

  • tatiangtatiang Posts: 11,699Member, Sous Chef, PRO, Senior Sous-Chef
    edited August 2012 Accepted Answer
    In your main actor, create two attributes: self.originalX and self.originalY (both real).

    At the top of your main actor's rules, add two behaviors: Change Attribute self.originalX to self.position.X and Change Attribute self.originalY to self.position.Y.

    Then, add a rule When actor collides with [other actor or tag] Change Attribute self.position.X to self.original.X and Change Attribute self.position.Y to self.original.Y.

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

Answers

  • tatiangtatiang Posts: 11,699Member, Sous Chef, PRO, Senior Sous-Chef
    You'll have to provide more details than that. How are you moving the actor? Why and how are you using a timer? Do you just need the actor to return to its original position when some condition is true?

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

  • pe6169pe6169 Posts: 3Member
    Hi, I want the actor to return to the start when it collides with another actor.

    Thanks...paul
  • pe6169pe6169 Posts: 3Member
    Yes, fantastic
This discussion has been closed.