Following actor

CowuniverseCowuniverse Member, PRO Posts: 97

So I have this actor which moves where touch is with the move behavior and it works. But when I press the play button to start the game it follows where the person pressed the play button. I tried to make the actor spawn 1 second later so it wouldn't follow touch when the play button was pressed, but it still did. I'm trying to make the actor stay still when the play button is pressed.

Answers

  • MentalDonkeyGamesMentalDonkeyGames Member Posts: 1,276

    In the play button, try "when touch is released" instead of "pressed".

    Mental Donkey Games
    Website - Facebook - Twitter

  • CowuniverseCowuniverse Member, PRO Posts: 97

    @NipaDidIt said:
    In the play button, try "when touch is released" instead of "pressed".

    I do have it like that

  • EverwildEverwild Member Posts: 48

    Make an attribute for a switch, an integer will do. For an example, we'll call it game.active.

    You've got your play button, and your main actor that's moving around.
    On the play button, make a rule that basically says 'one second after touch, change game.active to 1'.

    Then in your moving actor, in your movement rules, make it so it can only move if active = 1.

  • CowuniverseCowuniverse Member, PRO Posts: 97

    @Everwild said:
    Make an attribute for a switch, an integer will do. For an example, we'll call it game.active.

    You've got your play button, and your main actor that's moving around.
    On the play button, make a rule that basically says 'one second after touch, change game.active to 1'.

    Then in your moving actor, in your movement rules, make it so it can only move if active = 1.

    It doesn't move before I press the play button, but when I press the play button it moves to where you pressed the button and I tried what you did, but it did nothing. I even tried it with a delay and it still followed

  • CowuniverseCowuniverse Member, PRO Posts: 97

    bump

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited May 2015

    @Everwild said:
    On the play button, make a rule that basically says 'one second after touch, change game.active to 1'.

    Then in your moving actor, in your movement rules, make it so it can only move if active = 1.

    This should work. Post screenshots of the way you set up the rules (both the rule in the play actor and the rule in the following actor) and we can help you further.

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

  • CowuniverseCowuniverse Member, PRO Posts: 97


  • CowuniverseCowuniverse Member, PRO Posts: 97

    those are the rules

  • CowuniverseCowuniverse Member, PRO Posts: 97

    bump

  • CowuniverseCowuniverse Member, PRO Posts: 97

    bump

  • SocksSocks London, UK.Member Posts: 12,822
    edited June 2015

    @Cowuniverse said:
    those are the rules

    Can you explain how the rules work, what they are doing ?

  • CowuniverseCowuniverse Member, PRO Posts: 97

    @Socks said:
    Can you explain how the rules work, what they are doing ?

    When the play button is released it changes game.active to true and in the actor I'm saying only when game.active is true that it will move. But the problem is that I want the actor not to move to the position where I pressed the play button afterwards and it still does after 1 second, which it what I set it for.

  • frdfrd Member Posts: 191

    When game.active turns true change 'touch' coordinates to the actors coordinates?

    It looks like the touch command for start is setting a location which the actor moves to when game.active turns true. By changing the 'touch' coordinates to the actors coordinates when game.active turns true it should no longer move.

Sign In or Register to comment.