How do I "BUG TIME SCALE"

Get help using Construct 2

Post » Fri Apr 04, 2014 1:17 pm

Hi Guys !

i think i will become crazy soon :)

this is my problem, when my character hit another one, i would like to freeze the game x millisecond
so actually i simply ask "Under some conditions" to set the timescale to 0
but for a reason i don't understand yet, from the moment the timescale value =0 , even if in my code i said

"on freezed = 1
set timescale to 0
wait 0.3seconde
set time scale to 1

it not work at all , i'ts like the timescale 0 not allow me to turn back to 1 simply as i want
B
4
G
1
Posts: 35
Reputation: 595

Post » Fri Apr 04, 2014 1:49 pm

From my experience, when You set timescale to 0, "wait" command doesn't work or in other words - it works with the infinite slowdown. Try to set timescale to 0.01, but then drastically lower wait seconds, as it will be multiplied by 100.
B
41
S
14
G
6
Posts: 154
Reputation: 5,546

Post » Fri Apr 04, 2014 2:10 pm

@rozpustelnik , first at all thanks for your time ! yes i i set 0.01 it work but the rendering result is not what is expected
what is strange is i can switch the time scale by pressing a key touch but i can't switch with a variable who ask to wait
B
4
G
1
Posts: 35
Reputation: 595

Post » Fri Apr 04, 2014 4:49 pm

Perhaps you can get away with changing the particular objects timescale instead of projects timescale
B
41
S
14
G
6
Posts: 154
Reputation: 5,546

Post » Fri Apr 04, 2014 9:35 pm

@rozpustelnik , hey after some hours finally i've found the solution to use the Timescale 0 and be able to set the timescale to 1 later, the solution look like a trick for me but it work perfectly and it's robust , the solution consist to use the wallclocktime system expression, and create a global variable who will store the wallclocktime + X time value , don't forget to reset to 0 each time the variable

ok that's done for me on this topic :)
B
4
G
1
Posts: 35
Reputation: 595


Return to How do I....?

Who is online

Users browsing this forum: t redeemed t and 18 guests