Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: mport2004 on Thu 14/10/2004 02:25:49

Title: How do you have other guys moving and let you still control your guy?
Post by: mport2004 on Thu 14/10/2004 02:25:49
How do you have other guys moving and let you still control your guy? ???
Title: Re: How do you have other guys moving and let you still control your guy?
Post by: strazer on Thu 14/10/2004 03:03:09
You have to be more specific with what you want to do exactly.

With script, you can move characters using the MoveCharacter function, it's non-blocking.
If you're using the interaction editor, select "Character - Move Character" and be sure to set "Wait for move to finish" to False.

If you want to move a character along a path, use the MoveCharacterPath function.

If you want characters continually walking in the background, use the following code for reference:


function room_a() {
  // script for room: Repeatedly execute

  //...

  if (character[SOMEGUY].walking == 0) { // character has stopped walking (reached point C)
    MoveCharacterDirect(SOMEGUY, 0, 100); // walk to point A
    MoveCharacterPath(SOMEGUY, 160, 150); // then to point B afterwards
    MoveCharacterPath(SOMEGUY, 320, 100); // then to point C
  }

  /...
}


It's all very well explained in the manual. Read it carefully, it's excellent.
Title: Re: How do you have other guys moving and let you still control your guy?
Post by: mport2004 on Fri 15/10/2004 01:31:57
 :D thx i dident think of that I am not to good w/ scripting