well... I decided to rewrite my script and instead of creating the player Entity in WED to create it in script with ent_create. I had an action applied to the player entity and it had a pointer:
action fly(){
player = me;
the code....
}
Now I create the entity in main function and apply the same action to it, like this:
action fly(){
player = me;
other code....
}
function main(){
other code...
ent_create("plane.mdl",vector(*,*,*), fly);//* means some coordinates
}
But I don't know why the pointer does not work properly and if "player" is used anywhere I have crashes, like I have two actions for other entities with player.x and player.pan parameters, but they crash.
I looked through the manual and found how to make a pointer:
action fly(){
plane = me;
other code....
}
function main(){
other code...
ENTITY* plane = ent_create("plane.mdl",vector(*,*,*), fly);//* means some coordinates
}
and I replaced all player.x, player.pan and other stuff with plane.x, plane.pan and so on..., but I still have crashes in all other functions ans actions where the plane entity is used. The engine dows not show me the exact problems and the causes of crashes, but I guess it's the pointer. Maybe I don't describe the pointers properly. I have never created entities through ent_create, so I don't know how to make a pointer. Help please...
Thx