brwarner Posted October 16, 2005 Share Posted October 16, 2005 How would I go about using a script to cause a NPC of Faction 2 attack another NPC of faction 2. I have tried a few things but they don't work. Link to comment Share on other sites More sharing options...
Darth333 Posted October 16, 2005 Share Posted October 16, 2005 Change their factions to prey and predator: void main() { ChangeToStandardFaction(GetObjectByTag("object1_tag"), STANDARD_FACTION_PREDATOR); ChangeToStandardFaction(GetObjectByTag("object2_tag"), STANDARD_FACTION_PREY); } Depending on what you want to do, you may also use the SetMinOneHP function . Link to comment Share on other sites More sharing options...
brwarner Posted October 16, 2005 Author Share Posted October 16, 2005 I put this in the OnDialog script on a Younge Rancor in a custom module because I wanted it to just attack another object when I clicked on it yet when I do it simply stands there and I can't talk to it anymore. Not that it has a conversation. Link to comment Share on other sites More sharing options...
Darth333 Posted October 18, 2005 Share Posted October 18, 2005 Try this: void main() { object oNPC1= GetObjectByTag("insert_object_tag"); object oNPC2= GetObjectByTag("insert_object_tag"); ChangeToStandardFaction(oNPC1, STANDARD_FACTION_PREDATOR); ChangeToStandardFaction(oNPC2, STANDARD_FACTION_PREY); //these 2 lines will make them immortal and they will fight forever - remove them if you don't want this. SetMinOneHP(oNPC1,TRUE); SetMinOneHP(oNPC2,TRUE); DelayCommand(1.0, AssignCommand(oNPC1, ActionAttack(oNPC2)); } Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.