Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers AppGameKit Corner / Setting a sprite invisible without setspritevisible?

Years of Service
User Offline
Joined: 26th Jun 2020
Posted: 1st Sep 2022 22:15
Is there any other option that would set a sprite invisible other then setspritevisible (). I ask because I have a sprite that seems to be turning itself invisible without me calling the command,. I've printed getspriteexistst, getspritex, getspritex and those check out but getspritevisible shows that it does infact become invisible. I have ctrl f to search my code for any setspritevisible command regarding this sprite and nothing is there .
Virtual Nomad
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 1st Sep 2022 23:33 Edited at: 1st Sep 2022 23:40
check GetSpriteColorAlpha() where you may have set the Alpha to 0 via SetSpriteColor() or SetSpriteColorAlpha() ?

then, the random chance that the sprite is a solid color image and it matches SetImageTransparentColor() ?

also, are you sure the sprite isn't behind another? so, Set/GetSpriteDepth()

without knowing more about the project, it could be some other things. ie, are you using SetViewOffset() and/or SetViewZoom(), for example? see FixSpriteToScreen() for more on that.
Years of Service
User Offline
Joined: 26th Jun 2020
Posted: 2nd Sep 2022 14:37 Edited at: 2nd Sep 2022 15:32
i print(getspritevisible( and it switched to '0'. would any other command besides setspritevisible() effect that? i also searched every mention of in my code and the only thing i do with it is create it, set depth and set position

edit: so today the issue has fixed itself somehow and i havent changed anything possible a glitch that just needed a restart?
DBPro Master
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 2nd Sep 2022 15:25
Have you checked the position of the sprite? Maybe it's not invisible, just off-screen.
Tiled TMX Importer V.2
XML Parser V.2
Base64 Encoder/Decoder
Purple Token - Free online hi-score database
Legend of Zelda
Pixel-Perfect Collision

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds

Login to post a reply

Server time is: 2023-12-04 20:59:24
Your offset time is: 2023-12-04 20:59:24