What should you do if your player sprite is invisible?

Get help using Construct 2

Post » Tue Dec 29, 2015 6:13 pm

I have just managed to preview my game again and i immideatly ran into a problem. My player sprite is invisible. I don't know why. It doesn't have any behavior or any event connected to it that should do that. I have images for it. So why is it suddenly invisible when i don't want it to be?
B
12
S
2
Posts: 267
Reputation: 1,344

Post » Tue Dec 29, 2015 6:43 pm

Maybe it is on the wrong layer? I.E. there is a layer on top of your sprite player that is hiding it and making it invisible?
B
13
S
4
G
1
Posts: 18
Reputation: 1,081

Post » Tue Dec 29, 2015 6:47 pm

You have a C2-License, so start your layout in debug mode.

Select the player sprite object. It should be marked with a red box around it. If you don't see the red box, the sprite's position is not within camera view.
If you see the box, but no sprite is shown, check:

the player sprite objects opacity, visibility, frame, animation, layer.
If opacity is 0, you will not see it.
If visible is false, you will not see it.
Check in the editor if the current frame of the playing animation contains a visible image.
Check the point of Origin - maybe it is far off the edges of your character's image and thus your sprites position is way off.
Check if other objects share the layer with the sprite or are on a layer above the player sprite and if so, if they could overlap it (Z-Order).
Visual Novel 'Engine' in 100 Events
if you ever have to choose between buying Construct 2 on scirra.com or on Steam, read this: Review
B
22
S
9
G
1
Posts: 788
Reputation: 3,788

Post » Tue Dec 29, 2015 7:13 pm

Cyberphaze wrote:Maybe it is on the wrong layer? I.E. there is a layer on top of your sprite player that is hiding it and making it invisible?


It is on the same layer as all the other sprites. And no, no sprite is over it. The players prite is on top of layer and is still invisible for some reason.
B
12
S
2
Posts: 267
Reputation: 1,344

Post » Tue Dec 29, 2015 8:39 pm

I now it is a blind shot (not seeing your code) ... maybe you've got animation that is ending with a blank frame and not looping? Or having a blank first frame and animation is off?
B
13
S
4
G
1
Posts: 18
Reputation: 1,081

Post » Wed Dec 30, 2015 6:29 am

I remember something I had ran into was when i created a layer below the canvas original layer it bug out on me like that I remember to lock that one layer and do not add a layer below it.
B
52
S
24
G
6
Posts: 391
Reputation: 7,845

Post » Wed Dec 30, 2015 6:34 am

You probably imported frames and forgot to delete the empty frame which is probably at the end of your animation. Check your animation and delete any empty frames?
B
7
S
1
Posts: 39
Reputation: 511

Post » Wed Dec 30, 2015 7:40 am

mindfaQ wrote:You have a C2-License, so start your layout in debug mode.

Select the player sprite object. It should be marked with a red box around it. If you don't see the red box, the sprite's position is not within camera view.
If you see the box, but no sprite is shown, check:

the player sprite objects opacity, visibility, frame, animation, layer.
If opacity is 0, you will not see it.
If visible is false, you will not see it.
Check in the editor if the current frame of the playing animation contains a visible image.
Check the point of Origin - maybe it is far off the edges of your character's image and thus your sprites position is way off.
Check if other objects share the layer with the sprite or are on a layer above the player sprite and if so, if they
could overlap it (Z-Order).



I started Debug mode. I can see the player sprites hitbox but not the image. The player sprites visibility is false. So that is the reason why it isn't visible. But when i click on the true option it goes back to the false option every time. I re tested and re tested but it always goes back to the false option. What should i do to make it stay at the true option?
B
12
S
2
Posts: 267
Reputation: 1,344

Post » Wed Dec 30, 2015 7:43 am

Post a capx, I'll try to help
B
7
S
1
Posts: 39
Reputation: 511

Post » Wed Dec 30, 2015 9:04 am

talqvist wrote:Post a capx, I'll try to help


I prefer to keep my project private so don't look deeper into the project then necissary. I have made it so you start at only seeing the player sprite and one platform. Hopefully so is that all you need to see of the project. If i make a new layout the player sprite is visible but it needs to visible on all layouts. Down below is the link to the capx. My project takes up alot of memory. So now you know that and don't need to commentate on that.

https://www.dropbox.com/s/146guv3inp8t8 ... .capx?dl=0
B
12
S
2
Posts: 267
Reputation: 1,344

Next

Return to How do I....?

Who is online

Users browsing this forum: Christmas and 10 guests