A problem with dialogs and characters..

Started by lammhult, Sat 30/08/2003 14:02:59

Previous topic - Next topic

lammhult

I decided that it might be cool if the player character first talks to non-player character and after that the latter one starts walking to door (that is, location where I have drawn the door...) and then moves to different room. Or something like that.

And the problem is, I don't know how to do that. There must be a simple solution?

Scummbuddy

MoveCharacter
MoveCharacter (CHARID, int x, int y)

Starts the character CHARID moving from its current location to X,Y. CHARID can be either the character's number (as GetPlayerCharacter returns) or its ID set in the Room Editor. If the character cannot get to X,Y it will be moved as close as possible.
Control returns to the script immediately. The character will move in the background.

NOTE: this function only works with characters which are on the current screen.

NOTE: if you need to find out when the character has reached its destination, use the character[charid].walking variable. See the variables section for more information.

Example:

MoveCharacter(EGO,155,122);
while (character[EGO].walking) Wait(1);

will make the character walk to 155,122 and return control to the player when he gets there. (in reality you would use MoveCharacterBlocking instead of this).
------------------------------------

character[CHARID].x=character[CHARID].x;
character[CHARID].y=character[CHARID].y;
--------------------
character[CHARID].room=character[CHARID].room;
- Oh great, I'm stuck in colonial times, tentacles are taking over the world, and now the toilets backing up.
- No, I mean it's really STUCK. Like adventure-game stuck.
-Hoagie from DOTT

lammhult

But how I make the character move after it has had a conversation? I mean, when player talks to character, they will have a talk and when it's finished, the other character will start moving from its place to somewhere else.

AGS seems to think it's most important to move first and then start to talk.

Scummbuddy

- Oh great, I'm stuck in colonial times, tentacles are taking over the world, and now the toilets backing up.
- No, I mean it's really STUCK. Like adventure-game stuck.
-Hoagie from DOTT

SMF spam blocked by CleanTalk