//
// LESSON 2 (cannot harm sharing knowledge)

action d_gravity_act()
{
my.fat = on; // make the entity hit floor with entire size
while(1) //do this forever
{
temp.z= -10000; // trace downwards 10000
vec_set(temp,my.x);// copy entitys position (x) to - 10000 (z = up & down in 3d world x is forward & back and y = sides)
trace_mode = ignore_me + ignore_passable + use_box; // move thru the > my entity < (which action is set to ) passable entities and use entities size (bounding box)
trace(my.x,temp); // trace downwards
ent_move(my.x,target); // And move to the position , where tracing hits (target)
wait(1);
}
}

//
//B
//

Last edited by bbn1982; 06/28/18 17:22.