I can´t edit the first post.... WHY????
So i must do it here.. i reedited the code, so i´ve two Scripts..
here´s the Main Code:
Code:
//////////////////////////////////////////////////////////////////////////
#include <acknex.h>
#include <default.c>
#include "players_movement.c"
//////////////////////////////////////////////////////////////////////////
//
// DIE MAIN FUNKTION
//
//////////////////////////////////////////////////////////////////////////
function main()
{
fps_max = 60;
video_mode = 7;
screen_color.blue = 150;
wait(-1);
move_hero(); // Starting Key If´s and movement
move_sprite(); // Starting Sprite animation
}
AND HERE, the Code for Player Movement:
Code:
//////////////////////////////////////////////////////////////////////////
#include <acknex.h>
#include <default.c>
//////////////////////////////////////////////////////////////////////////
//
// VARIABLEN DEFINIEREN
//
//////////////////////////////////////////////////////////////////////////
var sprite_frames = 6; // Spriteanzahl für Standani
var switcher = 0; // Sheetswitcher
var heldenblickrichtung = 6; // Der Name sagts schon
var counter = 0; // Startframe
var bewegungstempo = 1; // Wie schnell bewegt sich der Held
var tester = 0; // Nur für Debug Zwecke
//////////////////////////////////////////////////////////////////////////
//
// DIE WINDOWS
//
//////////////////////////////////////////////////////////////////////////
PANEL* hero =
{
window (320,240,24,48,"Alucard_stand_r.tga",counter,0);
flags = VISIBLE;
}
PANEL* shower =
{
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,bewegungstempo);
flags = VISIBLE;
}
//////////////////////////////////////////////////////////////////////////
//
// DIE BEWEGUNGSCODES
//
//////////////////////////////////////////////////////////////////////////
function move_hero()
{
while(1)
{
if (key_d == 1)
{
if (heldenblickrichtung != 6)
{
hero = bmap_create("Alucard_walk_r.tga");
hero.size_x = 40;
sprite_frames = 16;
counter = 0;
switcher = 0;
heldenblickrichtung = 6;
}
// hero.pos_x += bewegungstempo;
camera.x += bewegungstempo;
}
if (key_a == 1)
{
if (heldenblickrichtung != 4)
{
hero = bmap_create("Alucard_walk_l.tga");
hero.size_x = 40;
sprite_frames = 16;
counter = 0;
switcher = 0;
heldenblickrichtung = 4;
}
// hero.pos_x -= bewegungstempo;
camera.x -= bewegungstempo;
}
if (key_d == 0 && key_a == 0)
{
if (heldenblickrichtung == 4 && switcher == 0)
{
hero = bmap_create("Alucard_stand_l.tga");
hero.size_x = 24;
sprite_frames = 6;
counter = 0;
switcher = 1;
}
if (heldenblickrichtung == 6 && switcher == 0)
{
hero = bmap_create("Alucard_stand_r.tga");
hero.size_x = 24;
sprite_frames = 6;
counter = 0;
switcher = 1;
}
}
wait(1);
}
}
//////////////////////////////////////////////////////////////////////////
//
// DIE SPRITE und KEY FUNKTION
//
//////////////////////////////////////////////////////////////////////////
function move_sprite()
{
while(1)
{
if (counter >= ((hero.size_x * sprite_frames) - hero.size_x))
{
counter = 0;
}
else
{
counter += hero.size_x;
}
wait(10);
}
}
Same problem.. He doesn´t change the Sprite....
HELP 
Ps.: with
Code:
hero.bmap = "Filename"
The Acknet.exe crashes... The game shuts down via Windows Error...