Random Positions...

Blitz3D Forums/Blitz3D Programming/Random Positions...

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

function DropItem(ent, x, z, w, l, p = 1); p = 1 to 100
     For ix = 1 to x + w
         for iz = 1 to z + l
             if rnd(0, 100) < p then
                linepick(ix, 100, iz, 0, -200, 0)
                if pickedentity() <> false then
                     positionentity Ent,ix,pixkedy#(),iz,1
                endif
             endif
         next
     next
end function  


I didnt test this just wrote it quickly.