What should you do if your player sprite is invisible?

0 favourites
From the Asset Store
Basic Rounded Vector Geometry Player Design with Glow for 3 player games
  • 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?

  • 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?

  • 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).

  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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?

  • 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.

  • 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?

  • 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?

  • Post a capx, I'll try to help

  • 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

  • Please don't commenate on my project when you reply whit an answer.

  • Have anyone solved it yet? It has been a while since i posted last. Atleast tell me some information you found out about the problem.

  • Can anyone answer please? Even if you havent solved the problem atleast tell me something about what you think the problem is. It has been a long time now since anyone replied.

  • Just answer.

  • So since you found out there's a problem with the sprite getting set invisible every time, you have to find the line of code that sets it to invisible every tick (or whatever).

    To do that:

    use the search function (CTRL + F) in event sheets, use "set invisible" as search term (without the quotes). I suppose in one of your relevant sheets there will be an event setting your sprite to invisble.

    If there is none, then my only idea would be something like a (third party?) behavior or code, that somehow leads to that... but it's unlikely.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)