Alright JazzDude i just got your mail, i've checked it, and everything works with me.

I use this script to all static objects, that i want my player to collide and do not pass through. Also is where i attached the function set to floor as you can see.

action PlayerCollide()
{
enable_polycollision = 2; // Enable poly collision (obviosly)
my.shadow = on;
my.entity_type = 1;
my.passable = off;
my.polygon = on;
wait(1);
c_updatehull(my,1);
settofloor();
}

This is the function i previously gave you. You might want to place this is the same file, *.wdl, but you must place the function set to floor before the action PlayerCollide

function SetToFloor()
{
var altitude;
temp.x=my.x;
temp.y=my.y;
temp.z=my.z;
vec_set(temp2,temp);
temp2.z=-4000;
trace_mode= ignore_me + ignore_you + use_box + IGNORE_PASSABLE + IGNORE_MODELS ;
trace(temp,temp2);
altitude=target.z-10;
my.z=altitude;
my.shadow = off; //If you want it to have it's own shadow.
my.ambient=85;
mat_model.albedo = 2;

}

I hope i'm not being too confusing, waiting for you're answer.
Also don't forget to add the action to the models you want to set to the floor.
I'm using a hmp terrain... What's the terrain maker you're using?

Edit: You can also do an action just to place models on the floor for
example:

Function settofloor()
{
...
}

Action ModelToFloor()
{
settofloor();
}

Edit Again lol: I only saw that you're using a model as terrain, you can convert it to a hmp in med... Or you can make an action to set to terrain, give it a polycollision and it might work aswell even being a model.

If the model don't stay on you're model (terrain) try to add this code to the
model (terrain) and then try again.

Action terrain()
{
enable_polycollision = 2;
my.polygon = on;
my.passable = off;
}

Last edited by Mythran; 12/05/07 00:35.