SOLVED: NPC Slow to materialise in Room

Started by barefoot, Fri 09/07/2010 14:39:46

Previous topic - Next topic

barefoot

Hi

I think i've had something this before... The below code works fine.. but unfortuanately NPC Professor Plum does not materialise untill a milli-second after he starts talking... Obviously I would like him there before anything is spoken...  Pervious room Follow attibutes set to 10,0 even though I added Follow Char in afterfadein ..   Object 1 is water rising slowly..  

Is this a nature of the beast?

Code: ags

function room_AfterFadeIn()
{
  cprof_plum.FollowCharacter(cindy_bones, 10, 92);
Display("The water gradually flows out filling the pit");
cindy_bones.Say("I think the waters speeding out a bit!");
cprof_plum.Say("Yes, its really starting to pour out!");
object[1].Move(227, 341, -15, eBlock, eAnywhere);
SetNextScreenTransition(eTransitionInstant);
cindy_bones.ChangeRoom(47);
}


Any help/comments appreciated..

-barefoot-

I May Not Be Perfect but I Have A Big Heart ..

Crimson Wizard

Can it be that prof plum is not initially invisible?

Sslaxx

Perhaps using a Wait (some small amount of time here) statement before the professor starts talking?
Stuart "Sslaxx" Moore.

barefoot

Hi

The NPC has been following Indy from previous rooms. And no, the Wait does not make any difference.

-barefoot-
I May Not Be Perfect but I Have A Big Heart ..

tzachs

When you use follow it does take the follower a few seconds to enter a new room.

Maybe you should call ChangeRoom for plum yourself when indy leaves the room that leads to that room... and if that doesn't work, you can stop the follow command, make plum change room and do a walk, say his lines and then return the follow.

barefoot

Hi

I actually added NPC to change from previous room with Indy:

Code: ags

 SetNextScreenTransition(eTransitionInstant);
  cprof_plum.ChangeRoom(46); 
 cindy_bones.ChangeRoom(46); 


and this seems to work better..Just spotted your post Tzachs

many thanks

-barefoot-
I May Not Be Perfect but I Have A Big Heart ..

SMF spam blocked by CleanTalk