How do you...

Non-platform specific questions.

How do you...

Postby Rux » Sat Jan 03, 2009 9:22 pm

...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. :?
I'm not good at coming up with signatures...
User avatar
Rux
 
Posts: 645
Joined: Sun Apr 29, 2007 9:26 pm
Location: Sitting on your moniter invisable.
Score: 35 Give a positive score

Re: How do you...

Postby makslane » Sat Jan 03, 2009 11:06 pm

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));
}
Game Editor is an open source game creator software that's wants to pay it's developers to keep evolving.
If you like Game Editor, make a review!
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Re: How do you...

Postby Rux » Sat Jan 03, 2009 11:37 pm

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:
I'm not good at coming up with signatures...
User avatar
Rux
 
Posts: 645
Joined: Sun Apr 29, 2007 9:26 pm
Location: Sitting on your moniter invisable.
Score: 35 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron