LDR Posted April 28, 2010 Share Posted April 28, 2010 Story: In my prison ship mod, you speak to an iridonian prisoner that suggests a prison break... Lets say I access a terminal called pri_cellterm and after a certain dialouge coice, the doors called pri_field open, and when they open, the pri_guard and pri_guardcap become hostile. Can someone make an example of how to make this script? Link to comment Share on other sites More sharing options...
newbiemodder Posted April 29, 2010 Share Posted April 29, 2010 You could put this script on the OnOpen script line for your door: void main() { object oObject1 = GetObjectByTag("tag of guard capt"); object oObject2 = GetObjectByTag("tag of guard"); ChangeToStandardFaction(oObject1, 1); ChangeToStandardFaction(oObject2,1); } That should work, I'm not the best script writer...... Link to comment Share on other sites More sharing options...
LDR Posted April 29, 2010 Author Share Posted April 29, 2010 Thank you! Edit: And how do you make a script that makes a certain door open via a computer terminal dialouge choice? Link to comment Share on other sites More sharing options...
newbiemodder Posted April 29, 2010 Share Posted April 29, 2010 script to open door I think is something like this: void main() { object oDoor = GetObjectByTag( "tag of your door"); ActionUnlockObject( oDoor ); ActionOpenDoor( oDoor ); } Link to comment Share on other sites More sharing options...
LDR Posted April 29, 2010 Author Share Posted April 29, 2010 Thank you so very much. One last thing. If you betray the iridonian that suggested the prison break, you tell the Guard Captain what the iridonian tried to make you do. What script do I make to make the iridonian dissapear from the module permanently when i hit that dialouge option? Link to comment Share on other sites More sharing options...
newbiemodder Posted April 29, 2010 Share Posted April 29, 2010 use the DestroyObject function, check this thread http://www.lucasforums.com/showthread.php?t=201971&highlight=destroy+object Link to comment Share on other sites More sharing options...
LDR Posted April 29, 2010 Author Share Posted April 29, 2010 It doesn't work. Only one person called pri_guard turns hostile. What if it was a whole bunch of NPCs named pri_guard? Link to comment Share on other sites More sharing options...
Hope Estheim Posted April 29, 2010 Share Posted April 29, 2010 void main() { // make main NPC go hostile object oNPC=GetObjectByTag("npc_tag"); ChangeToStandardFaction(oNPC, 1); // and if there are any thugs to fight... object oThug1 = GetObjectByTag("npc1_tag"); object oThug2 = GetObjectByTag("npc2_tag"); object oThug3 = GetObjectByTag("npc3_tag"); // make them hostile ChangeToStandardFaction(oThug1, 1); ChangeToStandardFaction(oThug2, 1); ChangeToStandardFaction(oThug3, 1); // give them kick to make them start attacking you ExecuteScript("k_ai_master",oNPC,1005); } That should show you what to do. Hah. Link to comment Share on other sites More sharing options...
LDR Posted April 29, 2010 Author Share Posted April 29, 2010 I'm still encountering the same problem. Only one of the pri_guard UTCs attacks me. Though the two driods and Guard Captain attack me, the rest of the pri_guard UTCs don't. Link to comment Share on other sites More sharing options...
Hope Estheim Posted April 30, 2010 Share Posted April 30, 2010 Add more Henchmen... LOL just add object oThug4 = GetObjectByTag("npc4_tag); ChangeToStandardFaction(oThug4, 1); and so forth and so forth... Link to comment Share on other sites More sharing options...
newbiemodder Posted April 30, 2010 Share Posted April 30, 2010 Try this one...I got this one from DarthStoney void sub1(string stringParam1) { int int1 = 0; object object1 = GetObjectByTag(stringParam1, int1); while (GetIsObjectValid(object1)) { ChangeToStandardFaction(object1, 1); object1 = GetObjectByTag(stringParam1, (int1++)); } } void main() { sub1("tag of first group of npcs"); sub1("tag of second group of npcs"); } Just add additional sub1's after the void main() function for each group of npc that have the same tag in a module. Link to comment Share on other sites More sharing options...
LDR Posted April 30, 2010 Author Share Posted April 30, 2010 Thank you, both of you. And newbiemodder (can I call you NBM? ) do I only put pri_guard after sub1, and that's all I do? Link to comment Share on other sites More sharing options...
newbiemodder Posted April 30, 2010 Share Posted April 30, 2010 lets say you have 15 npcs on your level all with the same tag...pri_guard...then yes put that shared tag name after the sub1...that should turn all npcs with that tag hostile.. Link to comment Share on other sites More sharing options...
LDR Posted April 30, 2010 Author Share Posted April 30, 2010 And then I just add void main() { object oObject1 = GetObjectByTag("pri_guardcapt"); object oObject2 = GetObjectByTag("pri_meddrd"); object oObject3 = GetObjectByTag("pri_maindrd"); ChangeToStandardFaction(oObject1, 1); ChangeToStandardFaction(oObject2, 1); ChangeToStandardFaction(oObject3, 1); } directly under it? Link to comment Share on other sites More sharing options...
newbiemodder Posted April 30, 2010 Share Posted April 30, 2010 no. just use the script I gave u in post #11 as your hostile script...all you need to do is change the tag name after the sub1 Link to comment Share on other sites More sharing options...
LDR Posted April 30, 2010 Author Share Posted April 30, 2010 It works! The jailbreak works! Thank you! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.