How do I get always same timed value [SOLVED]

Get help using Construct 2

Post » Fri Jan 01, 2016 9:15 pm

capx: https://www.dropbox.com/s/a9gxtd1za8sef ... .capx?dl=0

Im working on some playback function where everything works smoothly cept one thing...
So i made a simple example to go directly to the issue.
Its simple, you hold the SPACE button and it will add each 0.1 seconds one variable for 5 seconds. On release the values reset.
When starting the "game" on first try most of the time the value hits 45, the next tries hit value 41 almost always.
By refreshing the entire game i get the same thing, on first try it counts bigger value than on the other tries.
This causes huge differences in bigger timed calculations. What can i do to ensure that the result remains always the same?

Here is also the more complex version
capx: https://www.dropbox.com/s/bns9l19o4gtmv ... .capx?dl=0
you go to the green object and press space to trigger the recording. After its done you hold down the C button to have the blue one repeat what you did. On first try it shows 452 and on any other tries its always 402 even when i start recording another movement. It always happens on the first try when starting the game.
Last edited by Miu3 on Fri Jan 01, 2016 11:53 pm, edited 1 time in total.
B
47
S
10
G
5
Posts: 232
Reputation: 7,561

Post » Fri Jan 01, 2016 11:14 pm

Hey Miu,

There is a few different ways you could time it but why not keep it simple and instead of using 'timer < 5' switch it to 'variable1<45'. Then it will always be consistent.
ImageImage
B
122
S
23
G
7
Posts: 1,071
Reputation: 13,066

Post » Fri Jan 01, 2016 11:53 pm

GenkiGenga wrote:Hey Miu,

There is a few different ways you could time it but why not keep it simple and instead of using 'timer < 5' switch it to 'variable1<45'. Then it will always be consistent.


great, that actually fixed it! Thankyou very much :D
B
47
S
10
G
5
Posts: 232
Reputation: 7,561

Post » Sat Jan 02, 2016 12:45 am

My pleasure :)
ImageImage
B
122
S
23
G
7
Posts: 1,071
Reputation: 13,066


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 29 guests