Something
public text v1 · immutableCoin script thingy
list_coins=ds_list_create()
with (OBJECT_ZONE)
{
ds_list_add(other.list_coins,id)
}
ds_list_shuffle(list_coins)
i=ds_list_find_value(list_coins,0)
ds_list_destroy(list_coins)
//Rest is partially borrowed from spy's code
s = sprite_get_width(OBJECT_ZONE.sprite_index)/2;
xx = i.x-s+random(s*2);
yy = i.y-s+random(s*2);
instance_create(xx,yy,OBJECT_COIN);