Hello,
I did a 1st person move skript. It includes c_move and jumping. It´s without animation... Here it is:
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////// (c) 2005 by ABRAXAS-GAMES ////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ENTITY* spieler;
VAR laufen[3]=0,0,0;
VAR unten[3]=0,0,-3;
FUNCTION fall_event
{
if(event_type==event_block)
{
unten.z=0;
}
else
{
unten.z=-3;
}
if(event_type==event_entity)
{
unten.z=0;
}
else
{
unten.z=-3;
}
}
FUNCTION jump()
{
proc_kill(2);
unten.z=2;
wait(30); //the bigger the wait, the higher the jump
unten.z=-3;
}
ACTION krasser_hero
{
spieler=my;
my.event=fall_event;
while(1)
{
////camera////
camera.x=my.x;
camera.y=my.y;
camera.z=my.z;
camera.pan=my.pan;
camera.roll=my.roll;
camera.tilt=my.tilt;
////walking////
c_move (me,laufen,nullvector,GLIDE+IGNORE_PASSABLE);
c_move (me,unten,nullvector,IGNORE_PASSABLE);
////standanimation insert here/////
////controle////
if (key_cuu==1)
{
laufen=1;
///walkanimation insert here
}
else
{
laufen=0;
}
if (key_cud==1)
{
laufen=-1;
/////backward-walking animation insert here
}
if (key_cul==1)
{
my.pan+=5*time;
}
if (key_cur==1)
{
my.pan-=5*time;
}
if (key_space==1)
{
jump();
}
wait(1);
}
}
}
I hope, it´s usefull...credits would be fine...
Regards Efrint