Page 1 of 1

How do you...

PostPosted: Sat Jan 03, 2009 9:22 pm
by Rux
...have the script find an actor's animation name, then put it in a string? Like this...
Code: Select all
char* nameSpt;
nameSpt = enemy.animindex;
if(talk == 1)
{
    strcpy("Text.text, nameSpt " would like to battle.");
}


The nameSpt would resemble the actor's current animation name, and put it in the string.
I think most other programs would do this,

Code: Select all
//they would define the variable, then they would write the string out like
%nameSpt% would like to battle.


I need help. It would really help me from creating lots of script. :?

Re: How do you...

PostPosted: Sat Jan 03, 2009 11:06 pm
by makslane
Use the getAnimName fucntion.
Here is the example using your code and the sprintf function:

Code: Select all
if(talk == 1)
{
    sprintf(Text,text, "%s  would like to battle.", getAnimName(enemy.animindex));
}

Re: How do you...

PostPosted: Sat Jan 03, 2009 11:37 pm
by Rux
Thanks a ton. But it wouldn't read the animation name right, so I just had it read the name in the enemy's player card, and it works. THANK YOU. :mrgreen: