Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: on Fri 20/08/2004 11:34:14

Title: scripting problem with.. something
Post by: on Fri 20/08/2004 11:34:14
:) hi my name is Stiliyan. I'm working on a game with adventure parts in it and i am making these parts with AGS. i need to make a character move to a point and then the player charaacter moving to another point. then i must start a dialogue between them. how can i make that? i'm trying to edit the room script, but i cant save it because of errors. can you please help me?
Title: Re: scripting problem with.. something
Post by: Ishmael on Fri 20/08/2004 11:38:59
The basic for moving two characters and starting a dialog would be:

MoveCharacterBlocking(MAN,x,y,0); //notice, blocking so the character's walk one by one, and the last 0 makes him obey walkable areas
MoveCharacterBlocking(EGO,x,y,0);
RunDialog(z);

Where you replace the x's and y's with the coordinates, and the z with the dialog number.

Anyhow, post your script here so we can tell you what's wrong, and help fix it to work exactly the way you want.
Title: Re: scripting problem with.. something
Post by: on Fri 20/08/2004 13:12:44
#sectionstart room_a
function room_a() {
MoveCharacterBlocking(OLDMAN 133, 160, 1);
MoveCharacterBlocking(OPTUHOH 160, 160, 1);
}
#sectionend room_a

so that is the script. the program tells me that there is a problem with that. what i need is when the game is started the first room to be.. faded in. then an old man must walk from the left side to the middle of the room and wait, then the player character should come from the right side and walk to the middle and stop. then the dialogue should start, and after it the old man must walk away from the right side of the room, and the player should regain control over the main game character and.. well that's all of it. the reason why i posted this into the technical forumm was that i am using ags since 2002.. but never faced such issue
Title: Re: scripting problem with.. something
Post by: Ishmael on Fri 20/08/2004 16:30:55
MoveCharacterBlocking(OLDMAN, 133, 160, 1);
MoveCharacterBlocking(OPTUHOH, 160, 160, 1);

Here's the problem.

Btw. It's called "Beginner's Technical" because the problems dealt here are basic problems, it doesn't mean that only beginners should post here ;)
Title: Re: scripting problem with.. something
Post by: on Fri 20/08/2004 18:36:54
thank u, thank u verry much.. now i know for sure that i have to wear glasses lol :) thnx again the problem is solved.. for now ;)
btw i'll keep the note in mind