Coin 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
while true
{
s = sprite_get_width(OBJECT_ZONE.sprite_index)/2;
xx = i.x-s+random(s*2);
yy = i.y-s+random(s*2);
suitable=true
with OBJECT_COIN
{
if point_distance(x,y,xx,yy)<other.s then other.suitable=false
}
if suitable
break
}
instance_create(xx,yy,OBJECT_COIN);