Specific Timed Automated Movement

Get help using Construct 2

Post » Tue Nov 27, 2012 4:23 am

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"

Moving Forwards for 1 second

'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

Moving Backwards for 1 second
'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
Hayflick2012-11-27 04:28:26
B
12
S
2
G
4
Posts: 16
Reputation: 2,652

Post » Tue Nov 27, 2012 5:22 am

Is thisof any use ?
Using R238 for all examples
B
60
S
17
G
6
Posts: 363
Reputation: 9,125

Post » Tue Nov 27, 2012 6:14 am

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!
B
12
S
2
G
4
Posts: 16
Reputation: 2,652

Post » Tue Nov 27, 2012 6:22 am

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.Hayflick2012-11-27 09:07:59
B
12
S
2
G
4
Posts: 16
Reputation: 2,652

Post » Tue Nov 27, 2012 11:46 am

its basicly a swith with a timer

i made an example

example
ImageImage
B
61
S
19
G
6
Posts: 809
Reputation: 9,028

Post » Tue Nov 27, 2012 6:28 pm

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.

Hayflick2012-11-27 19:00:18
B
12
S
2
G
4
Posts: 16
Reputation: 2,652


Return to How do I....?

Who is online

Users browsing this forum: blackhornet, makkancs, TiagoCesar and 17 guests