Kha Posted August 15, 2006 Share Posted August 15, 2006 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_RIGHTWEAPON))); 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. Link to comment Share on other sites More sharing options...
Pavlos Posted August 15, 2006 Share Posted August 15, 2006 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. Link to comment Share on other sites More sharing options...
Kha Posted August 15, 2006 Author Share Posted August 15, 2006 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. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.