Hi i'm trying to create two animations in the same key down; one when facing right and one facing left. I got a runing demo if i can work this out. Yes i'm a noob but at least i got a book on C. I could do so much if i can do something like this work. Here what i try. simon is the event actor.
char *key = GetKeyState(); //Get entire keyboard state
int facing = 0; //Determines facing, 1 = right ; 2 = left ; 3 = up ; 4 = down.
int moving = 0;
if(key[KEY_DOWN] == 1) //down key is pressed
{
x = x + 0; //stop actor
}
if(key[KEY_DOWN] == 1 && facing == 1) //if he looks to the right
{
ChangeAnimation("simon", "kneeR", FORWARD);
}
if(key[KEY_DOWN] == 1 && facing == 2) //if he looks to the left
{
ChangeAnimation("simon", "kneeL", FORWARD);
}
I thought this was the best way with the facing state but i think it is missing code, maybe i have to give state to each key.I search for hours in tutorials and the forums, sorry if i miss something. I try alot of thing that i found but nothing seem to solve my problem. It a castlevania (In 2007 SOTN will be 10 years old) type of game and game editor is really great. I did great monsters behavior but now i realise that i have to learn C.
Thanks for any reply.
EvilAlex