Character Following

Started by 1337_123f13x35, Sat 18/02/2006 11:35:33

Previous topic - Next topic

1337_123f13x35

How do you get a NPC or other player character to CONSTANTLY follow your character throughout the whole game... I looked through the manual and did a search through the manual... but I can't find anything! ;D

Apprechiate the help ;D
8)

Ashen

You can't have searched the manual very hard if you didn't find Character.FollowCharacter(...)

If you want it to be all through the game, call it in game_start, or when you enter the first room, and never stop it.
I know what you're thinking ... Don't think that.

1337_123f13x35

Will I program this in the global script then?

Ashen

That's where game_start is, which is probably the simplest way to do it. If you went with one of the 'Player enters screen' interactions (first time, before fadein, after fadein) for the first room, then obviously it'd be in the room script.
I know what you're thinking ... Don't think that.

1337_123f13x35

From my understanding then i have to put in this line: cMan.FollowCharacter (cEgo, 5, 80);function game_start() {

However I'm getting an error saying "Unexpected cMan" Any ideas?

???

Once again... apprechiate the help :p

8)

Ashen

Does it actually say cMan.FollowCharacter (cEgo, 5, 80);function game_start() {? The command needs to be between the braces ('{' and '}') of the function, like this
Code: ags

function game_start() {
  cMan.FollowCharacter (cEgo, 5, 80);
}


Otherwise it's outside of the function, where it can't be run (and you'd get the error you described).
I know what you're thinking ... Don't think that.

1337_123f13x35

Thank you very much for the help it works perfectly now  :o

It's not hard once you understand how:)

Thanks very much for the help... I find the manual quite hard to follow tbh I'm afraid  >:(

But with your help things are turning out prety good I really apprechiate the help  ;D

Minigun_Fiend

If you use the 'player enters room' interaction, you can set 'character follows character'.
Could you not just do that on the first room, or would the other character not follow into different rooms etc?

A�rendyll (formerly Yurina)

I'm trying the same thing with my RPG, but the characters I don't want them to follow the main character forever.

Can I put in this code anywhere (in combination with stop following character)?
Yuna: Give me a Y!
Rikku: Give me an R!
Paine: Give me a break...
~Final Fantasy X-2

I've been

SMF spam blocked by CleanTalk