Jump to content

Home

Scripting questions


Vox Kalam

Recommended Posts

Does anyone have the scripts for:

A dialogue that transports you to another module...

You'll find several options here: http://www.lucasforums.com/showthread.php?t=132045

a cutscene upon entry into that module...

Well you can use the OnEnter event of a module to attach your script (check the .are file) or a trigger located near the entry point where you want to fire the cutscene. The script will vary depending on what you want to do but generally speaking cutscenes are .dlg files. So just start a conversation with an npc or an invisible placeable per example.

 

Script could be something like this:

void main()
{
   object oEntering = GetEnteringObject();
   object oPC=GetFirstPC();
   if (GetIsPC(oEntering)){
//replace object_tag by the tag of the object/npc to start the dialogue with
       DelayCommand( 0.5, AssignCommand( GetObjectByTag("object_tag"), ActionStartConversation ( oPC, "my_dlg", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE )));
  }
}

and an animation during a dialogue, without anyone speaking

Again, yopu won<t need a script for most animations during a dialogue. You can use the animation field in the .dlg file and the delay option: http://img.photobucket.com/albums/v144/Darth333/animdlgs.jpg

 

However, if you ever happen to need a script, here is what you can use:

void main()
{
//makes the player play a dead animation
//replace ANIMATION_LOOPING_DEAD by the animation you want
// the 1.0 corresponds to the speed of the animation
//the 10.0 at the end corresponds to the duration in seconds. 
AssignCommand(GetFirstPC(), PlayAnimation( ANIMATION_LOOPING_DEAD, 1.0, 10.0 ));
}

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...