Problem description: Is it bad to show the world an image by using world<<image and what exactly happens when you do this? |
just another sorta related question
if, and when, i want to remove these images from the game will setting every online clients, client.images, to null cause any problems? like will the images still linger somewhere given that the images are attached to a player |
it would be best to save the images in a list, and just do client.images -= listofimagestoremove
this way it will be easier to later on control what gets added or removed. |
In response to MrStonedOne
|
|
I am saving them in a list but the problem is there are around 200-400 of them. setting everyone's client images to null then rebuilding them to exclude this particular thing worked but i'm worried that the images aren't actually get removed from the world
|
In response to Zagros5000
|
|
You can add a world.log output to an override of X/Del() to see if your Xs are being garbage-collected.
(replace X with image, in your case) |
In response to Kaiochao
|
|
thanks :P looks like it does delete them. that's a pretty smart thing to do
|
It works just like outputting to an individual client, image gets added to their images list and that's that.
Keep in mind it's a good idea to keep track of what you've outputted so you can get rid of them without too much extra work.
Also, you need to make sure you output the images as clients enter, images output to world won't automatically be added as new clients join the world. Keeping track of the current output would help this as well.