ChangeRoom delaying on NPC's in certain rooms [Dumb scripter, not error]

Started by WHAM, Mon 08/02/2010 18:36:20

Previous topic - Next topic

WHAM

EDIT:

CRAP! Sorry for making a useless thread! It took me ages to spot my error (too much script in too little time = errorblindness), but I was sending the NPC to an entirely WRONG ROOM and the followcharacter script then later brought the NPC to the correct room. God I am stupid!

> END OF EDIT <

I use a similiar script in several rooms, but only in some rooms I have problems. The script is:

Code: ags

if (timer10 == 80) {
      if (Z01chasing == true && cZombie1.Room != cEgo.Room) {
      cZombie1.ChangeRoom(20, 54, 278);
      cZombie1.FollowCharacter(cEgo, 0, 0);
      }
      oDoorLeft.Animate(1, 3, eOnce, eNoBlock);
}


In most rooms the character appears and then immediately begins to follow the player and all works and animates nicely. However, in one room the very same script results in the character appearing several seconds LATE. The door animates ok and on time, but the enemy appears and starts moving only about a second or two AFTER that.

Any ideas as to what could be causing this behavior?

Wrongthinker and anticitizen one. Utterly untrustworthy. Pending removal to memory hole.

SMF spam blocked by CleanTalk