so far its working, i've managed to use the thing found in staffboots, and apply it to my flying system,
and i've managed to replace the ganis with my own, so i don't hear the grass anymore, but 1 problem, i've uploaded my ganis, and the images needed for them to testbed, but nothing appears, im completely invisble.
PHP Code:
//#CLIENTSIDE
function onKeyPressed(code,key)
{
if( key == "m" )
{
if(player.z >= 10)
{
player.chat="max altitude reached!";
}
else
{
settimer(0.1);
player.z+= 0.2;
}
}
else if( key == "n" )
{
if(player.z > 0)
{
player.z-= 0.2;
}
}
}
function onTimeOut()
{
if(player.z > 0)
{
replaceAni("walk", "myidle");
replaceAni("idle", "myidle");
this.speed = 0.1;
player.z-= 0.005;
for ( temp.i = 0; i < 4; i ++ )
{
if ( keydown(i) )
{ // if the key for that direction is pressed
player.x += vecx(i) * this.speed;
player.y += vecy(i) * this.speed;
}
settimer(0.05);
}
}
else
{
replaceAni("idle", "idle");
replaceAni("walk", "walk");
settimer(0);
}
}
oh, i've also made a jumpscript!
PHP Code:
//#CLIENTSIDE
function onKeyPressed(code,key)
{
if( key == "f")
{
if(player.z < 1 )
{
replaceAni("walk", "idle");
temp.i = 0;
while(temp.i <= 3)
{
settimer(0.05);
temp.i ++;
player.z += (1/temp.i);
sleep(0.03);
if(temp.i == 3)
{
replaceAni("walk", "walk");
temp.i = 0;
while(temp.i <= 3)
{
if(player.z < 1)
{
player.z = 0;
}
else
{
temp.i ++;
player.z -= (0.2*temp.i);
sleep(0.03);
}
}
}
}
}
}
}
i'm still trying to make it that you can actually jump over stuff with this one tho, haven't gotten that to work yet.