Attached is my Source for the cutscene file. Basically, all I have it do right now is make the player go invisible. It clones the pc. the clone says "i'm your evil twin" and runs to a specified waypoint. I then ask the player (that is hidden) to move to a 'camera' waypoint, but she doesn't move..... that is until AFTER the cutscene is over. The following is my code. I am running it via a Capt Placeholder npc that simple does ExecuteScript()
Any help would be thoroughly appreciated. and yes, I know about gestalt and I'm currently looking at the lexicon.
/*credit given where payment is demanded SPECIAL THANKS: -NWN Lexicon -Lilac Soul*/
//Example of a simple cutscene by Lilac Soul//If you have a script in OnCutsceneAbort, you can simply//ClearAllActions on the PC to make the scene stop,//then remove the invisibility visual effect and//SetCutsceneMode to false, and destroy the copy.
/*FORWARD DECLARATIONS*/void RunCutsceneActions();void CreateCopy(object oPC = OBJECT_SELF);
void main() { object oPC = GetFirstPC(); if (!GetIsPC(oPC)){ return; }
AssignCommand(oPC, RunCutsceneActions());}
//Wrapped in its own function so that oPC can be//OBJECT_SELF so there's no need for AssignCommand//Making heavy use of ActionDoCommand to be able to control//that one thing must finish before another startsvoid RunCutsceneActions() { //Fade out the PC ActionDoCommand(FadeToBlack(OBJECT_SELF, FADE_SPEED_FAST));
ActionWait(2.0);
ActionDoCommand(SetCutsceneMode(OBJECT_SELF, TRUE));
//Create a copy so we can move the invisible PC around //and still have him think he's standing where he was ActionDoCommand(CreateCopy());
//Make PC invisible effect eInv = EffectVisualEffect(VFX_DUR_CUTSCENE_INVISIBILITY);
ActionDoCommand(ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eInv, OBJECT_SELF, 14.0 ));
//Fade PC back in ActionDoCommand(FadeFromBlack(OBJECT_SELF, FADE_SPEED_FAST));
//Here then, move the invisible PC around and do whatever //It will look like the camera is just moving, and the //player will have the impression of standing still because //we created a copy of him //If having others do stuff, like oNPC, you can do this trick //To have the NPC action added to the PC's action queue //REMEMBER: NO MORE THAN 75 ACTIONS IN AN ACTION QUEUE!
/*START HERE----------------------------------------------------------------------------------------------------------*/ ActionWait(2.0); ActionDoCommand(AssignCommand(GetLocalObject(GetModule(),"pccopy"), ActionSpeakString("I'M YOU'RE EVIL CLONE!")));
//move the pc //ActionWait(1.0); //ActionWait(2.0); SendMessageToPC(GetFirstPC(), "attemping first method for moving hidden pc..."); ActionDoCommand(AssignCommand(GetFirstPC(), ActionMoveToObject(GetObjectByTag("wp_gr_CAM01"), TRUE, 0.0))); SendMessageToPC(GetFirstPC(), "...Done! attemping second method for moving hidden pc..."); //ActionWait(1.0); AssignCommand( GetFirstPC(), ActionMoveToObject(GetObjectByTag("wp_gr_CAM01"), TRUE, 2.0 ) ); SendMessageToPC(GetFirstPC(), "...Done! did it work?");
//ActionWait(2.0); ActionDoCommand(AssignCommand(GetLocalObject(GetModule(),"pccopy"), ActionForceMoveToObject(GetObjectByTag("wp_gr_CENTER"), TRUE, 0.0 )));
//wait ActionWait(6.0); //Eventually, we call ActionDoCommand(FadeToBlack(OBJECT_SELF, FADE_SPEED_FAST));
ActionWait(2.0); /*END HERE--------------------------------------------------------------------------------------------------------------*/
ActionDoCommand(SetCutsceneMode(OBJECT_SELF, FALSE));
//Destroy the copy ActionDoCommand(DestroyObject(GetLocalObject(GetModule(), "pccopy")));
ActionDoCommand(RemoveEffect(OBJECT_SELF, eInv));
ActionDoCommand(FadeFromBlack(OBJECT_SELF, FADE_SPEED_FAST));}
//Function for creating a copy of the PCvoid CreateCopy(object oPC = OBJECT_SELF) { object oCopy = CopyObject(oPC, GetLocation(oPC));
//Make sure the copy likes the PC SetIsTemporaryFriend(oPC, oCopy);
//Store so we can destroy later! SetLocalObject(GetModule(), "pccopy", oCopy);}
I'm going crazy,... yes, that's right another cutscene question
Débuté par
Tiggers.no.tail
, juin 30 2011 09:15
#1
Posté 30 juin 2011 - 09:15
#2
Posté 04 juillet 2011 - 12:39
I Looked at this for about few when you first posted it.
Could you perhaps clean up the format so it is easer to read?
Could you perhaps clean up the format so it is easer to read?
#3
Posté 04 juillet 2011 - 02:13
It's not important anymore. I just downloaded the new gestalt cutsene scripting system. its awesome. wasn't aware he updated it since the last time i had checked





Retour en haut






