remembering action

NklrcadeNklrcade Member, PRO Posts: 96
i have a Left, Right and Start button. i want to be able to click left,right,left,left and make it so the actor doesn't follow the moves until i press the Start button. any examples out there?

Comments

  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    If you don't want it to start doing anything prior to touching that button do something like this.

    Create a game attribute - Boolean - called Start

    In your Start button actor:
    Rule, when touch is pressed,
    Change attribute game.Start to true.

    Then, in your actor that moves with the arrows(or whatever you've set up)
    It should connect and know to move when you touch left, right etc.
    in those rules add another condition:
    When attribute game.Start is True

    Move etc

    This makes sure the actor won't move until you've hit start.

    Hope this helps

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited November 2012

    @Nklrcade

    Hi, useful info from @Braydon_SFX; to add a little bit more detail, you need to load your direction list into a table; an integer attribute for the table row, let's call that TurnRow, and an integer called Count for the amount of lefts and rights inputted before the Start button is pressed.

    roughly, in the Left button, similar for Right button

    When touch is pressed and Start is false
    Change Attribute scene.TurnRow to scene.TurnRow+1
    Change Attribute scene.Count to scene.Count+1
    change Table Value Table 1
    row: scene.TurnRow
    column 1 value: 1 ---- for Right button, this'll be 2


    then when Start is pressed, change attribute Start to true
    and with a boolean loop read, back the column until Count is 0, with your actor moving appropriately whether 1 or 2, i.e left or right each run through.

    It would take probably an hour or more to get a working test file or you, which
    I peronally haven't got time to do at the moment; but hopefully you've got enough info to know what direction to go in; best of luck.

    Fire away with any more questions though, as you go... :-)
  • NklrcadeNklrcade Member, PRO Posts: 96
    great thanks. i'll give it a try.
Sign In or Register to comment.