Strange dialog_request problem

Started by Goldsmith, Thu 12/08/2004 03:31:13

Previous topic - Next topic

Goldsmith

Hey, I'm pretty new to AGS, and I haven't had much time to scan the entire forums so I hope I'm not asking something that's been asked a thousand times before.

OK, so I'm using a room's interaction editor to have a character (scriptname INTRO) walk into the room when the player (EGO) enters it for the first time. After INTRO gets close enough to the player, he starts a multi-topic dialogue. Well, in the middle of the dialogue, I want INTRO to take a break and walk around a bit, and then carry on with the conversation. So, this is what I have in my dialog editor:

intro: You're badly drawn?!? Look at me!
run-script 1
intro: I'm just a badly animated stickman with red eyes!!!

This is what I have in my global script:

function dialog_request(int parameter) {
   Ã,  if (parameter == 1) {
MoveCharacter (INTRO, 140, 100);
MoveCharacter (INTRO, 140, 200);
MoveCharacter (INTRO, 140, 160);
   }
}

Unfortunately, I can't get the desired result from this command. INTRO just goes through the two lines without moving around first. I would've assumed that the problem is the room's interaction editor being on the same level as a room script (as is stated in the FAQ, no two scripts can be executed at the same time), if it weren't for the fact that if in the above dialog_request command I replace INTRO with EGO, EGO gladly walks around while INTRO finishes the dialogue.
The dialog_request is called for both characters (checked), but it only seems to work for EGO.

So, how can I do this properly?

Kweepa

Use MoveCharacterBlocking instead.
You need to use blocking commands - the game will then wait until the character finishes moving before performing any more commands.
Still waiting for Purity of the Surf II

Goldsmith


SMF spam blocked by CleanTalk