Create an image that is called from a mob proc for instance- delete that mob before the image is deleted- and the image will persist indefinitely even if it is qued to be deleted.
Numbered Steps to Reproduce Problem:
See above
Code Snippet (if applicable) to Reproduce Problem:
HitEffect()
view(3)<<sound(pick('SoundEffects/Blow1.ogg','SoundEffects/Blow3.ogg'),0,0,0,10)
var/image/a=new
a.layer+=TOPDOWN_LAYER
a.icon='hits0.dmi'
a.icon_state=pick("1","2","3")//,"","","","")
a.loc=src.loc
range(3)<<a
animate(a,pixel_x=rand(-8,8),pixel_y=rand(16,32),time=8,easing=BOUNCE_EASING)
spawn(9)
del(a)
Expected Results:
Actual Results:
It works, the effect stays permanently however if the mob calling the proc is deleted or logs out.
Does the problem occur:
Every time? Or how often? Yes
In other games? Yes
In other user accounts? Yes
On other computers? Idk
When does the problem NOT occur?
Only under ideal conditions(when the atom calling the proc exists)
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
Occuring since 504 for sure. Just upgraded to 506.
Workarounds:
Place an image creation proc on a global level and use that instead.
If you want a proc to keep running after its src is deleted, you can set the src to null in the proc: src = null. Alternatively, like you mentioned, you can move this effect creation to a global proc, or another type.