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.

How would I make a cutscene like this?

Page: 1 of 1
 SithRevan
08-19-2006, 1:39 AM
#1
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, 2:48 AM
#2
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, 2:50 AM
#3
Thanks for the help emperor devon, and also redhawke sorry about the picture!:D
 Kha
08-19-2006, 7:27 AM
#4
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, 7:37 AM
#5
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. :)
Page: 1 of 1