spideyseth 3 Posted April 12, 2023 I'm attempting to script a fight scene between two npc's in a dlg file. The npcs don't fight, however and the screen just vibrates for no reason and they just stare at each other. Here is my source script: void main() { object roland = GetObjectByTag("n_roland", 0); object oron = GetObjectByTag("orontag", 0); ChangeToStandardFaction(roland, 2); ChangeToStandardFaction(oron, 4); } Quote Share this post Link to post Share on other sites
DarthParametric 3,782 Posted April 12, 2023 You changed them to two factions that aren't hostile to one another (STANDARD_FACTION_FRIENDLY_1 and STANDARD_FACTION_FRIENDLY_2). They won't automatically fight. You can try something like: DelayCommand(0.1, AssignCommand(oMook1, ActionAttack(oMook2))); If you want them to fight with no further input, change them to two factions that are hostile to each other but neutral to the player, like STANDARD_FACTION_PREDATOR and STANDARD_FACTION_PREY. Quote Share this post Link to post Share on other sites
spideyseth 3 Posted April 13, 2023 I changed the code but they still are doing the same thing. I forgot to mention this is in a cloned module so maybe that has something to do with it? void main() { object roland = GetObjectByTag("n_roland", 0); object oron = GetObjectByTag("orontag", 0); ChangeToStandardFaction(roland, STANDARD_FACTION_PREDATOR); ChangeToStandardFaction(oron, STANDARD_FACTION_PREY); } Or maybe I messed up with the syntax or something? Quote Share this post Link to post Share on other sites
DarthParametric 3,782 Posted April 14, 2023 Are the tags for the NPCs correct? Quote Share this post Link to post Share on other sites
spideyseth 3 Posted April 14, 2023 Double checked yeah there correct it has to be something with the script syntax wise then. Or do you think its an issue with the module? Since its cloned via the holocron toolset. Quote Share this post Link to post Share on other sites
spideyseth 3 Posted April 14, 2023 Fixed the problem it was holocron toolset that was the issue I compiled the scripts there but then I switched to kotor scripting tool and it worked! Quote Share this post Link to post Share on other sites
spideyseth 3 Posted April 15, 2023 Last thing I want to ask is how to delay the conversation while they are fighting because it instantly exits the dialogue when they fight? Quote Share this post Link to post Share on other sites
DarthParametric 3,782 Posted April 15, 2023 You should look at some vanilla scenes for examples of how to do things like this. You can find most of the source code for the game's scripts here. Also peruse nwscript.nss which holds all the script functions. In this case, you want the functions ActionPauseConversation and ActionResumeConversation. For example: void main() { ActionPauseConversation(); // Insert whatever commands you want for this node. DelayCommand(2.0, ActionResumeConversation()); } You can change the delay to any value you want, as long as it is a float not an integer (i.e. 2.0 not 2, 1.0 not 1, etc.). Quote Share this post Link to post Share on other sites