Specific Timed Automated Movement

0 favourites
  • 6 posts
From the Asset Store
Run and Jump in 3 Dimensions! Take your platformer to the next level!
  • I've been trying to the last 3 days to get a rather fluent method of this. I want my hero to move forward for 1 second then stop. Once the next condition is met (not heros turn) I'd like her to move backwards for 1 second.

    With the code below, she never seems to move backwards. I'd love a better method of doing this, or some clarity, thanks :).

    Note: I'm looking for her to move Backwards once it is no longer her turn (turn =1)

    My "paraphrased - pseudo code"

    <font color=red>Moving Forwards for 1 second</font>

    'System' compare var turn =0 'hero' simulate 8Dir pressing Left.

    sub-condition var forward=1

        SubEvent

            'System' every 1 second    'subtract' 1 from var forward

            sub-condition var turn =0

    <font color=red>Moving Backwards for 1 second</font>

    'System' compare var turn =1   'hero' simulate 8Dir pressing Right.

    sub-condition var backward=1

        SubEvent

            'System' every 1 second   'subtract' 1 from var backward

            sub-condition var turn =1

  • Is thisof any use ?

  • I'm using 108.2. version so I can't open it(110). I'll check it shortly and get back to you.

    thank you very much for the 'hopeful' fix!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • This is very close to what I was hoping for. I found this to still be quite buggy in relation to the 1 second.

    Say the timer is at 0.89 and I press 'down' I stop moving after .11 seconds.

    I can't for the life of me get it to work fluently, I'm tinkering with it. I don't know if it's logic error or construct 2.

    Still looking for a solution.

  • its basicly a swith with a timer

    i made an example

    example

  • YES, oh man thank you. I just need to find out how to logic that into my game and automate it.

    And done. Thanks again.

    <img src="http://i.imgur.com/91lFp.png" border="0" />

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)