PDA

View Full Version : How would I make a cutscene like this?


SithRevan
08-19-2006, 01:39 AM
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

Emperor Devon
08-19-2006, 02:48 AM
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.

SithRevan
08-19-2006, 02:50 AM
Thanks for the help emperor devon, and also redhawke sorry about the picture!:D

Kha
08-19-2006, 07:27 AM
Hi,
I'm trying to learn how to script and now I'm curious... what this line does?

ActionDoCommand(SetCommandable(TRUE,oNPC));

stoffe
08-19-2006, 07:37 AM
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. :)