Idea

Game Editor comments and discussion.

Idea

Postby Hblade » Wed Apr 25, 2012 3:13 am

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
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Idea

Postby savvy » Wed May 09, 2012 11:22 am

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
--> For my help, i ask for a simple +1 if it helps! ^-^
--> I dont code, I type art which you dont understand.
--> I keep winning the 3D model challenge at college, teacher says: "you keep winning im not giving you prizes".
User avatar
savvy
 
Posts: 494
Joined: Wed Jun 03, 2009 11:55 am
Location: England
Score: 44 Give a positive score

Re: Idea

Postby Hblade » Wed May 09, 2012 3:10 pm

thanks :3
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest