What should you do if your player sprite is invisible?

Get help using Construct 2

Post » Wed Dec 30, 2015 9:43 am

Please don't commenate on my project when you reply whit an answer.
B
11
S
2
Posts: 262
Reputation: 1,309

Post » Wed Dec 30, 2015 11:01 am

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.
B
11
S
2
Posts: 262
Reputation: 1,309

Post » Wed Dec 30, 2015 1:54 pm

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.
B
11
S
2
Posts: 262
Reputation: 1,309

Post » Wed Dec 30, 2015 3:36 pm

Just answer.
B
11
S
2
Posts: 262
Reputation: 1,309

Post » Wed Dec 30, 2015 4:50 pm

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.
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: 787
Reputation: 3,786

Post » Wed Dec 30, 2015 6:46 pm

mindfaQ wrote: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.



Your solution did not work but it gave me the idea of another solution.
Event: System: Every Tick
Action: Sprite43: Set visible

And now Sprite 43 is visible. Problem solved.
B
11
S
2
Posts: 262
Reputation: 1,309

Post » Wed Dec 30, 2015 7:40 pm

The player sprite is visible and that,s godo and all but since it is set to always be visible so can it not flash. And the player sprite being able to flash is important. To make it only be visible every tick when the player is not flashing you would need a is not flashing event you could follow whit every tick set visible. Too bad there isn't a event liek that, only a is flashing event. I think you can create your own event types but i don't know how. How do you do it or is it another solution?
B
11
S
2
Posts: 262
Reputation: 1,309

Post » Wed Dec 30, 2015 8:01 pm

Setting your sprite visible every tick might be a workaround, but not a real solution. You should really find the cause of the problem (= you need to understand what's going on). I'm not willing to download your project, because it is too big.

You can invert the "is flashing"-event. Problem would be that in the event of flashing, you would do nothing, meaning you would end up with an invisible sprite during flashing duration just like you had initially. That's because you did not remove the cause of your problem.

Since your sprite has the flashing behaviour, you should check if it's flashing from the start (you can see that in the debug as well). If you activate the flashing every tick in some event this could lead to the behavior you are witnessing.

Further: events run from top of the event sheet to bottom. Your "every tick: set visible"-event made your sprite visible. That means the event making it invisible is located ABOVE that event. Move your visible-event upwards in the event sheet in steps and watch if you can see the sprite or not. Once you can't anymore, the event causing the bug must be somewhere between the current position of the event and the last position of the event that you checked.
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: 787
Reputation: 3,786

Previous

Return to How do I....?

Who is online

Users browsing this forum: GenkiGenga, jdevone, Lancifer and 11 guests