How do I find the error in the code?

Just started using Construct 2? Post your questions here

Post » Sat Jan 23, 2016 11:26 am

so I was doing this tutorial ( http://gamedevelopment.tutsplus.com/tut ... medev-8071 ) and it worked. then today I re-started again and it doesn't work. I don't see what I'm doing wrong this time.

here the first time when it's working

http://i67.tinypic.com/2iq4jo.png

Image

today it doesn't work but I can't find any apparent error in the code.

http://i66.tinypic.com/2iscen7.png

Image
B
12
S
5
Posts: 55
Reputation: 1,060

Post » Sat Jan 23, 2016 1:30 pm

Would be nice to know what "Doesn't work" means..
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 » Sat Jan 23, 2016 6:38 pm

LittleStain wrote:Would be nice to know what "Doesn't work" means..

it doesn't create the blocks grid.
B
12
S
5
Posts: 55
Reputation: 1,060

Post » Sat Jan 23, 2016 7:23 pm

andreone wrote:
LittleStain wrote:Would be nice to know what "Doesn't work" means..

it doesn't create the blocks grid.


What does it do?

Do blocks get created?
How many?
Where?
Is the event sheet attached to the layout?
Are the blocks set to visible?
Is the animation speed set to 0?
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 » Sat Jan 23, 2016 10:36 pm

LittleStain wrote:
andreone wrote:
LittleStain wrote:Would be nice to know what "Doesn't work" means..

it doesn't create the blocks grid.


What does it do?

Do blocks get created?
How many?
Where?
Is the event sheet attached to the layout?
Are the blocks set to visible?
Is the animation speed set to 0?


no blocks are created. yes, the event sheet is attached to the layout and the blocks are set to visible. I tried to set the animation speed to 0 but nothing happened.
B
12
S
5
Posts: 55
Reputation: 1,060

Post » Mon Jan 25, 2016 12:33 am

Then start debugging! What happens if you set the spawn position to 0? This way you know if it's an error in the calculation or somewhere else
B
83
S
22
G
15
Posts: 1,039
Reputation: 15,209

Post » Mon Jan 25, 2016 8:34 am

Better still, to stop all the pointless guesswork, post your .capx for others to look at.
This is the quickest method of getting effective help.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
129
S
29
G
75
Posts: 5,144
Reputation: 53,193

Post » Mon Jan 25, 2016 11:28 am

B
12
S
5
Posts: 55
Reputation: 1,060

Post » Mon Jan 25, 2016 11:42 am

You said your blocks weren't created, but your blocks are being created just fine..
They aren't visible because your background is in front of them..
So if you move your background to layer background, everything works..
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 » Mon Jan 25, 2016 5:43 pm

You said your blocks weren't created, but your blocks are being created just fine


As a reminder, you can press F5 to test your game in debug mode, and then you can see a list of objects. This way you would have been able to tell the blocks were being created and you could see in which layer they were
B
83
S
22
G
15
Posts: 1,039
Reputation: 15,209


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 0 guests