I have a character and he has a girlfriend he talks to her and she says she wants to go to a cave. How do I make her follow him?
From the manual:
Character.FollowCharacter(Character* chartofollow, optional int dist, optional int eagerness)
cGirlfriend.FollowCharacter(player, 10, 50)
Will make the girlfriend follow the player, about 10 pixels away, and a little bit before deciding to follow again. Just tweak those two values until you like what you get (read the manual first to see what they each do)
~Trent
I typed in exactly what you said to type.
{
cElizabeth.FollowCharacter(cDavy, 10, 0);
}
Then this happened:
Error(line 437): Unexpected '{'.
Help!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Where did you type that code? You need to tell AGS when you want it to run your command, so you need to choose the right event in the editor (eg. the Talk To Character event for the girlfriend) and put the code in there.
Quote from: Pumaman on Mon 16/02/2009 22:59:19
Where did you type that code? You need to tell AGS when you want it to run your command, so you need to choose the right event in the editor (eg. the Talk To Character event for the girlfriend) and put the code in there.
{
cElizabeth.FollowCharacter(cDavy, 10, 0);
}
He typed this..remove the { and } and everything should be fine.