Page 1 of 1

Idea

PostPosted: Wed Apr 25, 2012 3:13 am
by Hblade
I just had an idea. That idea is, (after reading someones post about crouching btw), making a way to manage multiple animations, or rather having "mechanics" to actors.

This method would require precise names for animations, however. I haven't put it to the test, but what if you create an array, like this
Code: Select all
int animStyle[5];


and you have multiple animStyles. when DOWN is pressed, crouch is active, so:
Code: Select all
animStyle[0]=1;
animStyle[1]=0...etc;


add a #define crouch 0 to make it look like animStyle[crouch]=1;

then to determine the movement style:
Code: Select all
switch(dir)
{
    case 0: //right
        if(animStyle[0])
        {   
            ... crouch right
        }
        etc...
    break;
}


See what I mean? This way you could have many animations for both the player and the AI with little trouble

Re: Idea

PostPosted: Wed May 09, 2012 11:22 am
by savvy
I believe I see what you are thinking here, its good!
If it is what i think it is, its pretty much a way to make animations without using things such as
Code: Select all
if(animinedx==BLAAAH||animindex!=blaaaaah&&BLAAAH)

You should experiment with it :D

savvy

Re: Idea

PostPosted: Wed May 09, 2012 3:10 pm
by Hblade
thanks :3