Is there a function to get the # of anims an actor has?

Non-platform specific questions.

Is there a function to get the # of anims an actor has?

Postby Cleve_Blakemore » Tue Sep 05, 2006 10:59 am

How do I find out how many animations a player has? This comes in handy for selecting one randomly or choosing from multiple options for the subsequent animation to run.

Oh ... and in case I forget ... MAKSLANE, yOu RoCk tO tHE eXtreME!!! :shock:
Cleve_Blakemore
 
Posts: 20
Joined: Sat Aug 05, 2006 7:26 am
Score: 1 Give a positive score

Postby makslane » Tue Sep 05, 2006 1:12 pm

There is no ready functions for this, but you can use:

Code: Select all
int getNumAnim(const char *actorName)
{
  int n = 0;

  while(getAnimName(n)[0]) n++;

  return n;
}


Put in the Global Code editor.
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest