untested, give it a try:
Code:
var earth_gravity[3] = 0,0, -986;
entity* pe_box;
function physics_ent
{
pe_box = me;
phent_settype(my, PH_RIGID, PH_BOX);
ph_setgravity ( earth_gravity );
phent_setmass(my, 5, PH_BOX);
phent_setfriction(my, 100);
phent_setelasticity(my, 50, 10);
phent_setdamping( my, 10, 10 );
}
function remove_objects
{
phent_settype(pe_box, 0,0);
}
function impact_pe
{
if(event_type == event_impact)
{
remove_objects();
physics_ent();
}
}
action init_box
{
my.enable_impact = on;
my.event = impact_pe;
}
as i said, didnt test it yet, gotta run to school, i'll try later if it doesnt work somehow.
regards,