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.

AppGameKit Studio Chat / deletesprite deletes my preloaded image too?

Years of Service
User Offline
Joined: 26th Jun 2020
Posted: 30th Aug 2023 17:16
i know if you preload an image and use that to create sprites with its supposed to only delete that sprite and image and not the original preloaded image correct? as in:

i have no other instances if that sprite being deleted and zero instances of the image (images.MetalBack) being deleted. It works the first time around but then when i come back to reload it again it says the image cant be found.
i added:

and this allows me to pass through again. I have never had this issue before. if anyone can give me a hint of what i might be doing wrong, thank you in advance.
User Banned
Posted: 30th Aug 2023 17:58
I think android needs to have case sensitive path and filenames
Hope this is the case
Years of Service
User Offline
Joined: 12th May 2018
Location: Nova Scotia
Posted: 31st Aug 2023 23:51
When in separate functions I have no problem with this technique - for example I delete menu sprites and then quickly re-load them from the pre-loaded image all the time. Are you calling LoadImage() more than once?

fun imgLoader()
images.MetalBack = LoadImage("Backgrounds/Metalbox.png")

fun drawSprites()
Gunboxs[i].id = createsprite(images.MetalBack)

fun deleteSprites()
Automation on Steam now!
Score Table Jr. on Google Play!
AGK Developer
Years of Service
User Offline
Joined: 16th Sep 2015
Location: US
Posted: 1st Sep 2023 05:52
@dandrews: Is any of that code in a function? What is the scope of your "images" variable? global? parameter for a function?

Login to post a reply

Server time is: 2024-02-24 21:51:02
Your offset time is: 2024-02-24 21:51:02