Sprite wont go invisible

For questions about using Classic.

Post » Mon Jan 11, 2010 11:59 pm

I added some gradients to bg tiles, tweaked a few sprites, deleting a lot of unneeded experimental sprites that were off screen and was feeling happy with the results. Saved the game as a new version.

My main character is a caterpillar. I had a caterpillar sprite and also a block sprite representing him that was set to invisible in its properties.

Now when I run the game the block sprite is visible. Then I added an always event to make him invisible but he still shows. I also tried turning off his invisibility in properties in case that interfered with the event. Nope. I could give up and reduce his opacity to 0% but the fact that he's still there is ruining one of my events. The old version of the game works fine. Does anyone know what could be making my block sprite persist despite the fact he's meant to be invisible?

I'm using Construct 99.62

Thanks
B
4
G
3
Posts: 41
Reputation: 982

Post » Tue Jan 12, 2010 12:04 am

Could you post a .cap?

My best bet is you simply have a lot of events and something you've forgotten about is actually setting it to visible and adjusting the opacity. Construct redraws the entire screen every tick, so there's no such thing as left-behind-glitches - if an object is there, it's really there, and really is visible (assuming you haven't just found a bug!).
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Tue Jan 12, 2010 12:34 am

Problem solved. How right you were Ashley with your forgotten event advice.

I had already checked all the events and actions involving the caterpillar block. Except one. I had an Event group that I didn't expand to look at because it was some ancient bit that I experimented with a long time ago. There was a collision event in it that made the block visible. Just testing something. I forgot what. So in my deleting-unused-sprites session yesterday I deleted one of the collision objects which made the block be visible action active.

Lesson learned. Don't mindlessly delete sprites without checking first to see if they are in any events or actions.

Relief. Thanks for the advice.
B
4
G
3
Posts: 41
Reputation: 982

Post » Tue Jan 12, 2010 12:58 am

Human error strikes again. After deleting the event with the non existent sprite, the original event that I was having trouble with still didn't work. I had mistakenly deleted an action that gave the position of a spite when I had only intended to change the co ordinates of that position.
B
4
G
3
Posts: 41
Reputation: 982


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests