Cego.FollowCharacter

From Adventure Game Studio | Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

FollowCharacter is a cool and powerful function in AGS. But if you don't disable it, it can lead to freezing your game. If you code a character to change room (Cnpc.ChangeRoom(x)) while following another character (specially in Rep_Execute) it'll most likely loop the game continuously.

The way to stop a character to follow another is simple:

Cnpc.FollowCharacter(null);