DarthRevan243 Posted April 27, 2008 Share Posted April 27, 2008 Okay, I'm making a mod but I've encountered a problem: I want to give the option for the PC to either kill all the republic soldiers or help them. I don't know what script to run to make the NPC's turn hostile. Here are their utc's if it helps: 12.utc asddd ddd g_turret n_repoffjmb n_repsoldjmb n_repsoldjmb1 n_repoffsd n_repoff33 n_repsold32 I need to make then ALL hostile after you declare war with the Captain. How do I do this? Please tell me if you know! -DarthRevan243 Link to comment Share on other sites More sharing options...
glovemaster Posted April 27, 2008 Share Posted April 27, 2008 You can use: [size=1]ChangeToStandardFaction(GetObjectByTag("[color=red]tag_of_object[/color]"), STANDARD_FACTION_HOSTILE_1);[/size] But for that you will need the tag rather than the ResRef. Hope that helps. Link to comment Share on other sites More sharing options...
DarthRevan243 Posted April 27, 2008 Author Share Posted April 27, 2008 Tag? Two more things to make it clearer: -It's for K1 -I'm using DLG Editor Link to comment Share on other sites More sharing options...
ForeverNight Posted April 27, 2008 Share Posted April 27, 2008 You need to create a script, call it "Makeevil" or something and then make the script that Glovemaster just gave you. Where it says tag you go into KotOR tool and look at the utc's of the characters that you just outlined. There you should find the tags of the characters. Tag is usually the same as the ResRef. Then you just attach the script (after compiling it into a ncs) to the dialog that you created. Place it on the dialog node, "You're going to die, Captain." or, better yet, the captain's response that ends the dialog. Once the dialog goes, the script should fire and the characters should all become hostile. PostScript: Using the DLG editor and K1 doesn't affect the process that Glovemaster outlined. Link to comment Share on other sites More sharing options...
Stream Posted April 27, 2008 Share Posted April 27, 2008 The tag's and ResRef's of creatures, items etc are different things - here's a shot In this script, replace npc_tag with the tags of your NPC's, compile it and attach it to a dialog node. void main() { // This tells the script who to affect object oNPC0 = GetObjectByTag("npc_tag"); object oNPC1 = GetObjectByTag("npc_tag"); object oNPC2 = GetObjectByTag("npc_tag"); object oNPC3 = GetObjectByTag("npc_tag"); object oNPC4 = GetObjectByTag("npc_tag"); object oNPC5 = GetObjectByTag("npc_tag"); object oNPC6 = GetObjectByTag("npc_tag"); object oNPC7 = GetObjectByTag("npc_tag"); object oNPC8 = GetObjectByTag("npc_tag"); object oNPC9 = GetObjectByTag("npc_tag"); object oNPC10 = GetObjectByTag("npc_tag"); // This changes the NPCs to a hostile faction ChangeToStandardFaction(oNPC0, 3); ChangeToStandardFaction(oNPC1, 3); ChangeToStandardFaction(oNPC2, 3); ChangeToStandardFaction(oNPC3, 3); ChangeToStandardFaction(oNPC4, 3); ChangeToStandardFaction(oNPC5, 3); ChangeToStandardFaction(oNPC6, 3); ChangeToStandardFaction(oNPC7, 3); ChangeToStandardFaction(oNPC8, 3); ChangeToStandardFaction(oNPC9, 3); ChangeToStandardFaction(oNPC10, 3); } --Stream Link to comment Share on other sites More sharing options...
ForeverNight Posted April 27, 2008 Share Posted April 27, 2008 Yeah... true, I was thinking more of items... though the ResRef's, at least of the Character's I was looking last, were the same as the tags... it doesn't matter though. Who's Tariga, I don't remember him/her at all? Link to comment Share on other sites More sharing options...
HdVaderII Posted April 27, 2008 Share Posted April 27, 2008 He was the dude on korriban that was human but spoke twilek Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.