hi guys. I have written some code for lite c that moves a char
on along the ground using keyboard up down left right arrows.
It can also roll left & right & roll up down using joystick.
For a spaceship
I need to modify this code so :
1)my model can fly off the ground into air(up and down)
2)throttle control for joystick to move model
Im unsure of the exact throttle command on a7, even after looking at manual
its someting like joystick.raw(0,0,throttle);but that gives errors.

all help welcome and thankyou
anyway here is my code :

DEFINE move_x,skill22; //movement skills
DEFINE move_y,skill23;
DEFINE move_z,skill24;
DEFINE force_x,skill25;
DEFINE force_y,skill26;
DEFINE force_z,skill27;
DEFINE velocity_x,skill28;
DEFINE velocity_y,skill29;
DEFINE velocity_z,skill30;

DEFINE animate,SKILL31; //animation skills
DEFINE animate2,SKILL32;
DEFINE animblend,SKILL33;
DEFINE currentframe,SKILL34;
DEFINE blendframe,SKILL35;
DEFINE z_offset,SKILL50; //gravity and jumping skills
DEFINE jumping_mode,SKILL51;
DEFINE gravity,SKILL52;
DEFINE movement_mode,SKILL53; //for various movement mainly combat
DEFINE moving,SKILL54;
DEFINE hit_by_player,SKILL55; //enemy skills
DEFINE entity_type,SKILL56;

FUNCTION rotate_entity(rotate_angle,rotate_speed);
ACTION player_action {
my.shadow = on;
WHILE (1) { //the main loop
handle_movement();
handle_camera();


}


FUNCTION handle_movement() {
temp.x = -1000;
temp.y = 0;
IF (key_cuu == 1 && key_cul == 0 && key_cul == 0 && key_cur == 0) { temp.x = camera.pan; }
IF (key_cud == 1 && key_cuu == 0 && key_cul == 0 && key_cur == 0) { temp.x = camera.pan + 180; }
IF (key_cul == 1 && key_cud == 0 && key_cuu == 0 && key_cur == 0) { temp.x = camera.pan + 90; }
IF (key_cur== 1 && key_cud == 0 && key_cul == 0 && key_cuu == 0) { temp.x = camera.pan - 90; }
IF (key_cuu== 1 && key_cul == 1 && key_cur == 0 && key_cud == 0) { temp.x = camera.pan + 45; }
IF (key_cuu == 1 && key_cur == 1 && key_cul == 0 && key_cud == 0) { temp.x = camera.pan - 45; }
IF (key_cud == 1 && key_cul == 1 && key_cur == 0 && key_cuu == 0) { temp.x = camera.pan + 135; }
IF (key_cud== 1 && key_cur == 1 && key_cul == 0 && key_cuu == 0) { temp.x = camera.pan - 135; }



my.pan += joy_force.x * time_step; // horizontal joystick movement changes PAN
my.tilt += joy_force.y * time_step; // vertical joystick movement changes TILT

IF (temp.x != -1000) {
IF (key_shift == 1) { temp.y = 10 * time; } ELSE { temp.y = 15 * time; }
// Through simple arithmetics the range can be changed:


}
IF (temp.y > 0) { rotate_entity(temp.x,20); }
my.move_x = fcos(temp.x,temp.y);
my.move_y = fsin(temp.x,temp.y);
c_move(my,nullvector,my.move_x,use_aabb | ignore_passable | glide);

}
FUNCTION handle_camera() {
vec_set(camera.x,vector(my.x + fcos(my.pan,-200),my.y + fsin(my.pan,-200),my.z +
80)); //place the camera behind the player
vec_diff(temp.x,my.x,camera.x); //make the camera look towards the player
vec_to_angle(camera.pan,temp.x);
}

FUNCTION rotate_entity(rotate_angle,rotate_speed) {
IF (my.pan == rotate_angle) { return; }
result = ang(rotate_angle - my.pan);
IF (result > 0) { my.pan += rotate_speed * time; }
IF (result < 0) { my.pan -= rotate_speed * time; }
IF (ang(rotate_angle - my.pan) < 0 && result > 0) { my.pan = rotate_angle; }
IF (ang(rotate_angle - my.pan) > 0 && result < 0) { my.pan = rotate_angle; }
}