Run dialogue and then animation

Started by Kinoko, Mon 16/02/2004 02:34:39

Previous topic - Next topic

Kinoko

I'd like to have an interaction where if I talk to a character, a dialogue is run, but after the dialogue stops, an animation is run. I know that the 'run dialogue' interaction is run last and even after reading a thread where this problem was addressed for someone else, that solution doesn't work for me.

Basically, I put "run-script 1" at the end of my dialogue, and then:

function dialog_request(int value) {

if (value == 1) {

FaceLocation (FISHER, 120, 140);
SetCharacterViewEx (FISHER, 31, 3, ALIGN_CENTRE);
AnimateCharacterEx (FISHER, 3, 5, 0, 0, 1);
}

}



at the end of my global script. It's telling me that dialogue_request is already defined.

Wolfgang Abenteuer

If it's saying that it's already defined, that means you probably already have a function dialog_request somewhere else in your global script.  Use Ctrl+F to find it and either get rid of one or combine them somehow.

~Wolfgang

Kinoko

Thanks for that. I found the line:

function dialog_request (int parameter) {

so I basically combined them (with no real scripting knowledge) like this:

function dialog_request (int parameter) {

if (parameter == 1) {
 
FaceLocation (FISHER, 120, 140);
SetCharacterViewEx (FISHER, 31, 3, ALIGN_CENTRE);
AnimateCharacterEx (FISHER, 3, 5, 0, 0, 1);
SetCharacterViewEx (FISHER, 31, 0, ALIGN_CENTRE);
}

}

The game worked fine with no errors (though I still can't be sure if what I did will have any other effects I just don't know about yet) but the animation still didn't work.

Then I realised I had stuck the "run-script 1" line AFTER the "stop" line in my dialog. I fixed that and it works fine now, so thanks! ^^ Though if anyone has any information on whether what I changed in the global script will have any other bad effects or not, please let me know.

SMF spam blocked by CleanTalk