ok.. this is a great edit of my mini Script ^^
i edited it, so i only have 1 Function, but different handles to call the directions and sprites.

here´s the code:
Code:

//////////////////////////////////////////////////////////////////////////
#include <acknex.h>
#include <default.c>
//////////////////////////////////////////////////////////////////////////
//
// VARIABLEN DEFINIEREN
//
//////////////////////////////////////////////////////////////////////////

var sprite_frames = 6; // Spriteanzahl fur Standani
var switcher = 0; // Sheetswitcher
var heldenblickrichtung = 6; // Der Name sagts schon

var counter = 0; // Startframe
var bewegungsmuster = 0; // Wie bewegt sich der Held


var tester = 0; // Nur für Debug Zwecke

BMAP* alucard_sheet = "Alucard_stand_r.tga";
STRING* debugger1 = bewegungsmuster;

//////////////////////////////////////////////////////////////////////////
//
// DIE WINDOWS
//
//////////////////////////////////////////////////////////////////////////

PANEL* hero =
{
window (320,240,24,48,alucard_sheet,counter,0);
flags = VISIBLE;
}

PANEL* shower =
{
window (0,500,800,64,alucard_sheet,0,0);
digits ( 10,10,10,*,1,counter);
digits ( 10,25,10,*,1,hero.size_x);
digits ( 60,25,10,*,1,sprite_frames);
digits ( 110,25,10,*,1,tester);
flags = VISIBLE;
}

//////////////////////////////////////////////////////////////////////////
//
// DIE BEWEGUNGSCODES
//
//////////////////////////////////////////////////////////////////////////


function move(bewegungsmuster)
{



if (bewegungsmuster == 6)
{
if (heldenblickrichtung != 6)
{
alucard_sheet = "Alucard_walk_r.tga";
hero.size_x = 40;
sprite_frames = 16;
counter = 0;
switcher = 0;
heldenblickrichtung = 6;
}
hero.pos_x += 3;
}

if (bewegungsmuster == 4)
{
if (heldenblickrichtung != 4)
{
alucard_sheet = "Alucard_walk_l.tga";
hero.size_x = 40;
sprite_frames = 16;
counter = 0;
switcher = 0;
heldenblickrichtung = 4;
}
hero.pos_x -= 3;
}

if (bewegungsmuster == 0)
{
if (heldenblickrichtung == 4 && switcher != 1)
{
alucard_sheet = "Alucard_stand_l.tga";
hero.size_x = 24;
sprite_frames = 6;
counter = 0;
switcher = 1;
}
if (heldenblickrichtung == 6 && switcher != 1)
{
alucard_sheet = "Alucard_stand_r.tga";
hero.size_x = 24;
sprite_frames = 6;
counter = 0;
switcher = 1;
}
}



}



//////////////////////////////////////////////////////////////////////////
//
// DIE SPRITE und KEY FUNKTION
//
//////////////////////////////////////////////////////////////////////////
function move_hero()
{
while(1)
{
if (key_d == 1) {move(6);}
if (key_a == 1) {move(4);}
if (key_a == 0 && key_d == 0) {move(0);}


tester = hero.size_x * sprite_frames;
wait(1);
}
}

function move_sprite()
{
while(1)
{
if (counter >= ((hero.size_x * sprite_frames) - hero.size_x))
{
counter = 0;
}
else
{
counter += hero.size_x;
}
wait(10);
}
}


//////////////////////////////////////////////////////////////////////////
//
// DIE MAIN FUNKTION
//
//////////////////////////////////////////////////////////////////////////

function main()
{
fps_max = 200;
video_mode = 7;
screen_color.blue = 150;
wait(-1);
move_hero();
move_sprite();
}



My problem is..
When i start the script, the actor moves by itself to a direction.. but i hit no key...
What should he do?
1.) He must play the stand animation when no key is hitten
2.) he must play the walking animations when a direction key is pressed
3.) The size of the Window must be variable, because the stand sprite has a Framesize of 24 pixels... and the walk animations of 40 pixels...

In this Zip File are the Prite_Lines i used in that code:

Hope someone knows an answer to this... <a href="/Sonstiges/players_movement.zip" target="_blank">>>Click me<<</a>
IMPORTANT!!!: The Script in that Zip Acrhive is an older version.. so don´t loom at them ^^.. just at the Sprites if you want to try some thing with them.


Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<