Mr. Versipellis wrote...
Hi there. I'm having a bit of trouble with the ActionGestaltSpeak function - the character is playing the animation and is recognising other instructions in the same script, but the text is not appearing above his head. Oddly enough, another character in the same cutscene carries out the command perfectly. The lines in question are here - anyone know what the problem could be?
//Start Gestalt cutscene
GestaltStartCutscene (oPC, "cs_invasion");
//COA Erno
AssignCommand(oErno, ClearAllActions());
//Erno faces the handler and curses
//DelayCommand (1.0, AssignCommand(oErno, ClearAllActions(TRUE)));
GestaltActionFace (1.1, oErno, 0.0, 2, oHandler);
GestaltActionSpeak (2.0, oErno, "Damn...", ANIMATION_LOOPING_TALK_FORCEFUL, 2.5, 0.0);
Yep, a couple of things here. First: don't mix DelayCommand / AssignCommand calls with Gestalt cutscene calls. Gestalt has its own way of controlling participants in the cutscene that doesn't play well with trying to give them commands outside the system. Gestalt provides functions for nearly every one of the things you might want to do via DelayCommand / AssignCommand combinations, so you should use them instead. For example, using the code above:
GestaltStartCutscene(oPC, "cs_invasion");
GestaltClearActions(0.0, oErno);
GestaltActionFace(1.1, oErno, 0.0, 2, oHandler); // Make sure oHandler exists
GestaltActionSpeak (2.0, oErno, "Damn...", ANIMATION_LOOPING_TALK_FORCEFUL, 3.0);
I changed two of your parameters to GestaltActionSpeak in the last line above. First, I set the animation duration to 3.0 seconds. As a general rule, you shouldn't give an animation duration of less than 3.0 seconds -- from what I've observed, unpredictable and improper behavior can occur if you do. Second, I removed the (last) animation speed parameter so that it would default to 1.0. I think that's what you want for an ordinary animation, and the 0.0 might be what's messing it up.
Let me know if that helps!
Modifié par AndarianTD, 17 octobre 2012 - 10:11 .