[SOLVED] Problem with text.

Just started using Construct 2? Post your questions here

Post » Sat Dec 19, 2015 7:29 pm

Hello, I have a little problem with a text, the problem is that the word "ready" will never write.

Why the variable "var" never worth 4 ?.

It should display "ready" after it is set GameState to "count", but does not.

Can anyone help me please ?.

https://dl.dropboxusercontent.com/u/60803633/test.capx

Image

Image
Last edited by The Mnk on Sat Dec 19, 2015 8:37 pm, edited 1 time in total.
B
28
S
11
G
20
Posts: 723
Reputation: 13,662

Post » Sat Dec 19, 2015 8:09 pm


It should display "ready" after it is set GameState to "count", but does not.


That is, because you override in the same moment var=4 the "ready" with text.var what is in this moment 3 and then var=4 is never be true again.
B
24
S
3
G
1
Posts: 429
Reputation: 2,121

Post » Sat Dec 19, 2015 8:11 pm

Brick by brick, stone by stone.
B
52
S
24
G
17
Posts: 273
Reputation: 12,663

Post » Sat Dec 19, 2015 8:36 pm

Ok, I've solved, thanks guys.
Although I not understand why my method is not working.
B
28
S
11
G
20
Posts: 723
Reputation: 13,662

Post » Sat Dec 19, 2015 8:47 pm

Every x seconds is counted from the start of the game..
In this case the start of the game is the start of this layout..
the wait two seconds in the "on start of layout" ends exactly at 2 seconds, which is the same tick that gamestate is set to count and that tick the every x seconds is also true..

Simple..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sun Dec 20, 2015 8:07 pm

Ok, thanks again, I think I understand a little better the "every" action.
B
28
S
11
G
20
Posts: 723
Reputation: 13,662


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 2 guests