Jump to content

Home

How would I make a cutscene like this?


SithRevan

Recommended Posts

I was wondering if it would be possible to make a cutscene that a selected ncp walks to other ncps and starts a fight, defeats them than he walks over to your character and starts dialog, So would this be possible? If so coud somebody please help me out thanks!:D

 

P.S.: here is a basic picture of want to do...

 

http://home.surewest.net/nitrogt4/ship_module.bmp

 

Thanks for any help you guys can give me!

 

Mod Edit: Changed Image to a link, 1.5 MB Image Warning to all...

 

SithRevan, please use images with a smaller filesize like JPG's. ;) -RH

Link to comment
Share on other sites

Sure, it's possible. You'd have to make a script that makes the NPCs walk to certain waypoints (There's a tutorial which explains how to that). You should also put them on factions that are hostile towards each other in their .utc files, and then insert a script into the OnDeath function of one of the NPCs that triggers a conversation. It would go like this:

 

void main() {
 object oNPC=GetObjectByTag("npc_tag");
 location lMe=GetLocation(GetFirstPC());
   ActionDoCommand(SetCommandable(TRUE,oNPC));
 AssignCommand (oNPC,ActionForceMoveToLocation(lMe,FALSE));
 AssignCommand (oNPC, ActionStartConversation(GetFirstPC()));
}

 

You also should make the NPC who survives friendly to your character at first, or you could ruin the whole sequence.

Link to comment
Share on other sites

Hi,

I'm trying to learn how to script and now I'm curious... what this line does?

 

ActionDoCommand(SetCommandable(TRUE,oNPC));

 

The SetCommandable() function toggles if the creature specified can be given new commands. If set to FALSE it essentially locks their action queue. It can be used to enforce that a particular set of queued actions are performed without interruption (though unless you make them commandable afterwards again they'll just stand there doing nothing).

 

As for the above code I'd assume that oNPC is not OBJECT_SELF, otherwise (assuming Commandable is false) the command wouldn't be added to the action queue since it's locked. :)

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...