Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Tolman

#1
I tried with cianty's code, but in the room script. Now the character, while walking, flickers for a few seconds, and then doesn't move to the desired spot, even if she turns to face down. She doesn't change the animation, anyway.
It might be useful to add that every character, except for the player, changes room according to a timetable in the global script.


bool miss_arrived = false;
int mode = 0;

function room_RepExec()
{
     if (cChar3.Room == 4 &&  mode == 0)
   {
     
     
     cChar3.Walk(407, 358, eNoBlock, eAnywhere);
      mode++;
      }
      if (!cChar3.Moving && mode>0)
      {
        cChar3.FaceLocation (cChar3.x, cChar3.y+1);
        cChar3.LockView(11);
        cChar3.Animate(1, 5, 0, eNoBlock);
        miss_arrived = true;
      
      }

#2
The actions of every NPC are set by a timer, so perhaps this is the reason it does work, more or less.
I'll try to apply your suggestion.
#3
I'm trying to make an NPC enter the room, walk to a chair and sit. After many trials & errors it works, sort of, but the character keeps walking on place for a few seconds before moving. I wonder why.
I put the walking script in globalscript.asc, after I found out that in the room script it would make the character endlessly walk on place.

Here's the globalscript:

 
    if (cEgo.Room == 4)
    {cChar3.ChangeRoom(4, 607, 465);
   cChar3.Walk(407, 358, eNoBlock, eAnywhere);


and here's the room code:
bool miss_arrived = false;


function room_RepExec()
{
     if (cChar3.Room == 4) 
   {
     
      if (!cChar3.Moving && !miss_arrived) 
      {
        cChar3.FaceLocation (cChar3.x, cChar3.y+1);
        cChar3.LockView(11);
        cChar3.Animate(1, 5, 0, eNoBlock);
        miss_arrived = true;
      
      }
   }

SMF spam blocked by CleanTalk