Thanks for replying. I'm posting all the code. It's actually little because I just started trying to convert it. I've defined temp as a vector but its complaining about skill22 not being a member of an entity.
///////////////////////////////////////////////////////////////////////////////
#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; //4 various movements, mainly combat
#define moving SKILL54;
#define hit_by_player SKILL55;
#define entity_type SKILL56;
VECTOR* temp;
function handle_movement() {
temp.x = -1000;
temp.y = 0;
if(key_w ==1) { temp.x = camera.pan; }
if(key_s ==1) { temp.x = camera.pan + 180; }
if(key_a ==1) { temp.x = camera.pan + 90; }
if(key_d ==1) { temp.x = camera.pan - 90; }
if(temp.x != 1000) { temp.y = 15 * time_step; }
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() {
//place cam behind player
vec_set(camera.x, vector(my.x + fcos(my.pan, -200), my.y + fsin(my.pan, -200), my.z + 80));
vec_diff(temp.x, my.x, camera.x); //make cam look towards player
vec_to_angle(camera.pan, temp.x);
}
action player_action()
{
set(my, SHADOW);
while(1); {
handle_movement();
handle_camera();
wait(1);
}
}