Rapier_21 Posted December 14, 2008 Share Posted December 14, 2008 Got another question now. I'm trying to re-script the end of the Reilly's Rangers quest, to add a check to see if all the rangers survived. If so, I want the player to get a reward of both the unique minigun and the ranger armor. I understand how to change the script reward so that you get both (I used the "Other" portion of the script, for when you ask if she has any other stuff, but I don't understand how to make it so it checks to see if everyone survived the ambush. Help? Link to comment Share on other sites More sharing options...
perpl3x3d Posted December 14, 2008 Share Posted December 14, 2008 You would have to add a series of if statements in checking each of the NPC's status. A great example is in Tranquility Lane, specifically the Betty script. Here is a piece of that code: if ( OldLadyDithersRef.GetDead != 0 ) OldLadyDithersRef.Resurrect 0 endif if ( MabelHendersonRef.GetDead != 0 ) MabelHendersonRef.Resurrect 0 endif if ( GeorgeNeusbaumRef.GetDead != 0 ) GeorgeNeusbaumRef.Resurrect 0 endif if ( PatNeusbaumRef.GetDead != 0 ) PatNeusbaumRef.Resurrect 0 endif if ( TimmyNeusbaumRef.GetDead != 0 ) TimmyNeusbaumRef.Resurrect 0 endif if ( RogerRockwellRef.GetDead != 0 ) RogerRockwellRef.Resurrect 0 endif if ( JanetRockwellRef.GetDead != 0 ) JanetRockwellRef.Resurrect 0 endif if ( MarthaSimpsonRef.GetDead != 0 ) MarthaSimpsonRef.Resurrect 0 endif if ( BillFosterRef.GetDead != 0 ) BillFosterRef.Resurrect 0 endif I'm assuming that if you were to create an if statement like this: if (RangersPerson.GetDead !=0 && RangersPerson2.GetDead !=0 && RangersPerson3.GetDead !=0) player.additem HEXHERE "1" player.additem HEXHERE "1" endif Of course you'd replace the "RangersPerson" with the right NPC name, I just don't know the # of rangers and name of them off the top of my head. Another way of doing it is an "increase if" method, you define a variable, global probably, and do something like this if(RangersPerson.GetDead !=0) yourvariable+1 endif if(RangersPerson.GetDead !=0) yourvariable+1 endif if(RangersPerson.GetDead !=0) yourvariable+1 endif if(yourvariable = TOTALOFRANGERS) player.additem HEXHERE "1" player.additem HEXHERE "1" endif It just makes it easier to read, but either will work, assuming you get all of the details figured out, I'm not familiar with the coding techniques, but I'm familiar with coding in general so that should work. If you are doing it through like, a dialog option, you'd have to set those series of IF statements in the right location, I'm assuming when the dialog action is triggered, or a certain dialog action. Hope this helps Link to comment Share on other sites More sharing options...
Rapier_21 Posted December 14, 2008 Author Share Posted December 14, 2008 Hm. I'll give it a shot tomorrow, after I get done playing with the nuke-launching Eugene. :whistling: Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.