MoveCharacter in conversations

Started by Alfa 1, Mon 02/05/2005 21:11:12

Previous topic - Next topic

Alfa 1

Hello there guys... I decided to start a game, I've just got the hang of it, partially of the script, and what I'm stuck at seems to be like a basic question but I don't know how to do it. Let's just say two characters are in a dialog, and for example, my main character, shall we call him EGO, has to show something to the character he's talking to. Normally we wouldn't just add a text like... ''Hey, check this out''
We'd also want the character to move to appropriate coordinates. Well here lies the problem. The dialog script accepts only a limited number of commands like add-inv and so on but not MoveCharacter or anything from that branch.
How would we make the character move to the location of the guys he's talking to since I can't put the MoveCharacter command in the script?

Thanks alot.

MrColossal

Just a quick note, your signature picture is too large, if you read the text above where you input the URL for the sig it says something about sigs being 50x100, thanks and welcome

Eric
"This must be a good time to live in, since Eric bothers to stay here at all"-CJ also: ACHTUNG FRANZ!

strazer

Code: ags

// dialog script

//...

@3 // Hey, check this out!
man: Okay...
run-script 12 // call dialog_request function with value 12
man: Wow, I'm impressed!
return

//...


Code: ags

// global script

//...

function dialog_request(int parameter) {

  if (parameter == 12) { // if "run-script 12" used
    MoveCharacter(EGO, 100, 150);
    MoveCharacterBlocking(MAN, 90, 150);
  }

//else if (parameter == 7) { // if "run-script 7" used
//  do some other stuff
//}

}

//...


Ashen

This thread, which is still on the first page, also answers the question.
And, I think the maximum image size is 600 by 50.
I know what you're thinking ... Don't think that.

Alfa 1

Okay, thanks a lot. I haven't gotten into scripting yet so this will be very useful. Thanks again. Oh, and I've gotten rid of the sig until I find a better one.

SMF spam blocked by CleanTalk