[Suggestion] Just a tick

Discussion and feedback on Construct 2

Post » Sun Oct 06, 2013 8:22 pm

Im having to use Wait a lot to allow the engine to update.
The thing is its difficult to know how long it should wait.
I know I just need a tick, but a tick can vary over different platforms, hardware, etc.
I've tried wait dt, but that doesn't give it quite enough time, and you most definitely don't want to wait longer than a tick if you can.

Anyway my suggestion would be either a new expression for the time it would take to update, IE a tick, or an addition to the system wait that works the same way.
Image ImageImage
B
172
S
50
G
182
Posts: 8,439
Reputation: 115,097

Post » Sun Oct 06, 2013 8:32 pm

+1 , I was thinking about this a lot today too! A sort of "Tick Wait" where we can specify the amount of ticks to wait. :P
B
51
S
20
G
10
Posts: 571
Reputation: 9,819

Post » Sun Oct 06, 2013 9:01 pm

You can do that already. There's the system expression tickcount. Just store tickcount to a variable in the affected event and then check for tickcount + 1 (or + n)

Edit: Of course you would check for
tickcount = variable + ntulamide2013-10-06 21:11:02
Image
B
24
S
8
G
10
Posts: 1,821
Reputation: 8,279

Post » Sun Oct 06, 2013 9:13 pm

[QUOTE=tulamide] You can do that already. There's the system expression tickcount. Just store tickcount to a variable in the affected event and then check for tickcount + 1 (or + n)

Edit: Of course you would check for
tickcount = variable + n[/QUOTE]

Like compare variable=tickcount+ n, do stuff?

Yeah, I'm way to lazy for that.
Image ImageImage
B
172
S
50
G
182
Posts: 8,439
Reputation: 115,097

Post » Sun Oct 06, 2013 10:14 pm

Doesn't "wait 0 seconds" already wait 1 tick?

From the manual:
[quote]One more trick: "Wait 0 seconds" postpones the following actions until the end of the event sheet.[/quote]
B
94
S
33
G
118
Posts: 5,392
Reputation: 75,845

Post » Sun Oct 06, 2013 10:28 pm

Well it may need longer for somethings.
For example the browser object trigger on re-sized needs a wait longer than 0.10 to get the new size.newt2013-10-06 22:30:55
Image ImageImage
B
172
S
50
G
182
Posts: 8,439
Reputation: 115,097

Post » Mon Oct 07, 2013 12:23 am

[QUOTE=newt]Yeah, I'm way to lazy for that.[/QUOTE] At least you're honest.
Image
B
24
S
8
G
10
Posts: 1,821
Reputation: 8,279

Post » Mon Oct 07, 2013 2:04 am

[QUOTE=R0J0hound] Doesn't "wait 0 seconds" already wait 1 tick?

From the manual:
[quote]One more trick: "Wait 0 seconds" postpones the following actions until the end of the event sheet.[/quote][/QUOTE] +1
B
12
S
3
G
1
Posts: 347
Reputation: 2,866

Post » Mon Oct 07, 2013 2:28 am

Well, I use "Wait 0" a lot already, however I was thinking more of something that, instead of executing the action at the end of the event sheet, it will continue to wait til it reaches the "Wait tick" again THEN execute. But yeah :P
B
51
S
20
G
10
Posts: 571
Reputation: 9,819

Post » Mon Oct 07, 2013 2:56 am

And what's the problem using tickcount? I use it all the time for exactly the situations, newt explained in his first post. Isn't such a big deal.
Image
B
24
S
8
G
10
Posts: 1,821
Reputation: 8,279

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 1 guest