Cego.FollowCharacter: Difference between revisions

From Adventure Game Studio | Wiki
Jump to navigation Jump to search
(FollowCharacter may freeze game)
 
No edit summary
Line 5: Line 5:


'''Cnpc.FollowCharacter(null);'''
'''Cnpc.FollowCharacter(null);'''
[[Category:AGS History]]

Revision as of 13:29, 3 June 2021

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);