Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Newbie trying to do a cutscene!

Page: 1 of 1
 Kha
08-15-2006, 2:14 PM
#1
Hi... I'm a completly newbie in scripting and I'm trying to do a simple cutscene!
I've extracted the .git, .are and .ifo files from the area I want, and added a script in OnEnter slot of the .are file to load the npcs and it works, I've tried to make it load a dialog to control de cut scene but it doesn't call it.


void main() {
object oCarth = GetObjectByTag("Carth");
object oRevan = GetFirstPC();

AssignCommand(oRevan, ActionJumpToLocation(Location(Vector(64.91, 92.91, 0.0),0.0f)));
AssignCommand(oRevan, ActionUnequipItem(GetItemInSlot(INVENTORY_SLOT_RIG HTWEAPON)));
AssignCommand(oCarth, ActionJumpToLocation(Location(Vector(64.91, 92.42, 0.0),180.0f)));

ActionStartConversation(GetFirstPC(), "kha_dlg01");
} {

I don't know if it is a problem with the script, or the dialog file. Do I need to put it in an npc instead? Any link or suggestion will be greatly appreciated.

Thanks,
Kha.
 Pavlos
08-15-2006, 3:21 PM
#2
The conversation will not start on its own. A creature must start it with the creature defined in the first parameter of the function - in this case the GetFirstPC().

void main() {

// Seeing as how you have placed this in the .are, it is fired more than once
// you may wish to add a variable check :).
// Remove the /* and */ to get the variable parts to compile - there should be two lots of
// them.

/*if (!GetGlobalBoolean("MODULE_ENTERED")) {*/

object oCarth = GetObjectByTag("Carth");
object oRevan = GetFirstPC();

AssignCommand(oRevan, ActionJumpToLocation(Location(Vector(64.91, 92.91, 0.0),0.0f)));
AssignCommand(oRevan, ActionUnequipItem(GetItemInSlot(INVENTORY_SLOT_RIG HTWEAPON)));
AssignCommand(oCarth, ActionJumpToLocation(Location(Vector(64.91, 92.42, 0.0),180.0f)));
AssignCommand(oRevan, ActionStartConversation(GetFirstPC(), "kha_dlg01"));
/*}*/
}

Replace the "MODULE_ENTERED" with the name of a boolean of your choice :). This way the cutscene won't always fire upon entering the module. Of course, if it is a "stunt" module (Only used for this scene) then you don't need the variable check... and you probably knew that already so I'll just shut up now.
 Kha
08-15-2006, 6:02 PM
#3
Thank you very much Pavlos it worked, I'm struggling with the camera angles now...
It is just a stunt module, but I'll keep the boolean in mind and in the code, thanks. ;)
Page: 1 of 1