Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Thriller on Sun 20/04/2008 03:11:16

Title: Moving non-playing characters
Post by: Thriller on Sun 20/04/2008 03:11:16
 I have a problem I was going through the manual and i seen how to move characters and I typed it in the Repeat script and it works but i don't want the timer on it and it won't let me leave the current room the moving non-player character is in.
                            Sorry if you don't understand :(

          ~Thriller
Title: Re: Moving non-playing characters
Post by: Mazoliin on Sun 20/04/2008 08:02:03
Sorry, I don't understand.

What code did you use?
How do you want the character to walk?

If you want the non-player character walk around in a path (say, a patrolling guard) you can use this:


//In room repeatedly_execute

if (cGuard.Walking == false){
  cGuard.AddWaypoint(x1, y1); //First place to walk to
  cGuard.AddWaypoint(x2, y2); //Second place to walk to
  //Keep adding the above AddWaypoint depending on the route
}



Hope this is to any help
Title: Re: Moving non-playing characters
Post by: Thriller on Sun 20/04/2008 08:29:38
 Thats what i was looking for but in the second spot to walk it says

"MoveCharacterPath: Move is to complex,cannot add any further paths"
Title: Re: Moving non-playing characters
Post by: Thriller on Sun 20/04/2008 08:34:16
 some reason it only works with moving once