///////////////////////////////
#include <acknex.h>
#include <default.c>
///////////////////////////////
action my_action()
{
set(my,SHADOW|CAST);
var dist_to_move=0;
var skin_count=0;
var vSpeed=2;
int flip_rate=30;
while(1)
{
vSpeed=2*(key_w-key_s);
dist_to_move=(vSpeed*flip_rate)*time_step;
if(dist_to_move)
skin_count+=((vSpeed*time_step)/dist_to_move);
skin_count%=3;
c_move(my,vector(vSpeed*time_step,0,0),nullvector,GLIDE);
my.skin=integer(skin_count)+1;//clamp(integer(skin_count),1,3);
DEBUG_VAR(my.skin,50);
wait(1);
}
}
function main()
{
vec_set(screen_size,vector(800,400,0));
vec_set(screen_color,vector(50,1,1)); // dark blue
vec_set(sky_color,vector(50,1,1)); // dark blue
video_window(NULL,NULL,0,"My New Game");
d3d_antialias = 1;
shadow_stencil = 3;
fps_max=60;
level_load("tTest.wmb");
vec_set(camera.x,vector(-250,0,50));
vec_set(camera.pan,vector(0,-15,0));
}