-------------------------------------------------------------------------------
Action player1_action
{
while (1){
.........
if(key_f==1)
{
if(floatstate==0)
{
my.z=50;
my.blendframe = float;
my.animate2 = 0;
my.animblend = blend;
handle_char4_movement();
handle_camera();
handle_char4_animation(1);
floatstate=1;
}
else
{
if(floatstate==1)
{
my.z=-3;
my.blendframe = stand;
my.animate2 = 0;
my.animblend = blend;
handle_char4_gravity();
handle_char4_movement();
handle_camera();
handle_char4_animation(1);
floatstate=0;
}
}
}
else{
if(key_f==0){
floatstate=0;
handle_char4_gravity();
handle_char4_movement();
handle_camera();
handle_char4_animation(1);
}
}
}
}
--------------------------------------------------------------------------------
This code is to make the charater float when f is press.
but how come when i release F in come down again.
how to make it permenant float and the second time i press it come back down?
i got float state value to let the animation function to determine when to fly and when to walk.
Last edited by alex5801; 11/26/06 12:54.