Here's the function that controls collision with trashcans:
rem COLLISION - TRASHCANS
function check_collision(current_speed#,amount)
for a=6001 to 6001+amount
if object exist(a)=1
result = check_box_collision(10,100,a,20)
if result < 50.0 and trashcan_status(a-6001)=0
play sound 10
trashcan_status(a-6001)=1
trashcan_pos#(a-6001,0)=object position x(10)
trashcan_pos#(a-6001,1)=object position z(10)
trash_speed(a-6001)=int(current_speed#)
endif
if trashcan_status(a-6001)=1
trash_x#=object position x(a)+(object position x(a)-trashcan_pos#(a-6001,0))/((180-trash_speed(a-6001))/3)
trash_z#=object position z(a)+(object position z(a)-trashcan_pos#(a-6001,1))/(180-trash_speed(a-6001))
if object angle x(a)<91.0
xrotate object a,object angle x(a)+1
position object a,trash_x#,sin(object angle x(a)*2)*trash_speed(a-6001),trash_z#
endif
if object angle x(a)=>91.0 then trashcan_status(a-6001)=2
endif
if trashcan_status(a-6001)=2 and result > 1000.0 then delete object a
if result > 1500.0
if trashcan_status(a-6001)<> 2 then hide object a
else
if trashcan_status(a-6001)<> 2 then show object a
endif
endif
next a
endfunction
Quote: "
Amd 2500+ | 1024mb pc2700 | A7N8X-X | Geforce4 ti 4200 128mb"