JediKnight707 Posted October 30, 2005 Share Posted October 30, 2005 I had the great person kdsphantom compile a script for me and I stuck it in my override (I also took out all mods that I had as well) along with the custom items that I was trying to put in. Is there something wrong with the script? Here it is: void main() { object oDoor = GetObjectByTag("MorgueDoor"); SetLocked(oDoor, FALSE); DelayCommand(1.0, AssignCommand(oDoor, ActionOpenDoor(oDoor))); object oCorpse = GetItemPossessor(GetObjectByTag("plasmatorch")); if (GetIsObjectValid(oCorpse)) { CreateItemOnObject("anakin_saber", oCorpse); CreateItemOnObject("jinn_saber", oCorpse); CreateItemOnObject("luke_saber", oCorpse); CreateItemOnObject("maul_saber", oCorpse); CreateItemOnObject("obiwan_saber", oCorpse); CreateItemOnObject("palpatine_saber", oCorpse); CreateItemOnObject("windu_saber", oCorpse); CreateItemOnObject("yoda_saber", oCorpse); CreateItemOnObject("vader_saber", oCorpse); CreateItemOnObject("koon_saber", oCorpse); CreateItemOnObject("dooku_saber", oCorpse); } } Link to comment Share on other sites More sharing options...
kdsphantom Posted October 30, 2005 Share Posted October 30, 2005 Hiya It compiles fine, but hopefully you set up that compilier of your own but it doesnt fire is that what you mean ? and those items arent on the corpse ? kdsphantom Link to comment Share on other sites More sharing options...
Det. Bart Lasiter Posted October 30, 2005 Share Posted October 30, 2005 Perhaps it's the 'int nStackSize' parameter in 'CreateItemOnObject()'. Try using this format for it: CreateItemOnObject("/*item*/", oCorpse, 1); Link to comment Share on other sites More sharing options...
JediKnight707 Posted October 30, 2005 Author Share Posted October 30, 2005 Yeah, it won't fire, there are no items (except the plasma tourch) on the dead dude. Link to comment Share on other sites More sharing options...
Darth333 Posted October 30, 2005 Share Posted October 30, 2005 It's not necessary to determine the stack size in this script unless you want to put a value greater than 1. Are you sure you script is even fired? Make sure the script's name is a_doormor.ncs. Also, the script will only fire once when you select the following dialogue option on the computer to unlock the morgue door: MORGUE UNLOCKED MEDICAL BAY FUNCTIONS EMERGENCY LOCKDOWN ENTER COMMAND It is only at this moment that the items will be created on the corpse. Use a save game from before unlocking the door. Link to comment Share on other sites More sharing options...
JediKnight707 Posted October 31, 2005 Author Share Posted October 31, 2005 I put in the script like you said Darth, but now the door won't open, it remains locked any suggestions? Link to comment Share on other sites More sharing options...
kdsphantom Posted October 31, 2005 Share Posted October 31, 2005 hiya Jedi member to bring up a saved game from before you did anything with the door. And you mean the door is locked when you click it, But you went to the computer and went through those 4 conditions to open it right? and then over to the door, and its been a while since i was at the begining of TSL but does the computer open the door for you or do you still click the door? I think I membered right. the computer unlocks and you still click it right, and this is where your saying the door is still locked correct? Kdsphantom Link to comment Share on other sites More sharing options...
JediKnight707 Posted November 1, 2005 Author Share Posted November 1, 2005 Its supposed to open for you, but it won't And I'm loading it from an auto-save, so does that count? Link to comment Share on other sites More sharing options...
Det. Bart Lasiter Posted November 1, 2005 Share Posted November 1, 2005 Try this thread. It should work after that, that way you fire the original, and yours from the same trigger. Link to comment Share on other sites More sharing options...
JediKnight707 Posted November 1, 2005 Author Share Posted November 1, 2005 void main() { object oDoor = GetObjectByTag("MorgueDoor"); SetLocked(oDoor, FALSE); DelayCommand(1.0, AssignCommand(oDoor, ActionOpenDoor(oDoor))); object oCorpse = GetItemPossessor(GetObjectByTag("plasmatorch")); if (GetIsObjectValid(oCorpse)) { CreateItemOnObject("anakin_saber", oCorpse); CreateItemOnObject("jinn_saber", oCorpse); CreateItemOnObject("luke_saber", oCorpse); CreateItemOnObject("maul_saber", oCorpse); CreateItemOnObject("obiwan_saber", oCorpse); CreateItemOnObject("palpatine_saber", oCorpse); CreateItemOnObject("windu_saber", oCorpse); CreateItemOnObject("yoda_saber", oCorpse); CreateItemOnObject("vader_saber", oCorpse); CreateItemOnObject("koon_saber", oCorpse); CreateItemOnObject("dooku_saber", oCorpse); ExecuteScript("i forgot what script it was :)", OBJECT_SELF); } Like that jmac? Link to comment Share on other sites More sharing options...
oldflash Posted November 1, 2005 Share Posted November 1, 2005 Make your own locker and put all items in inventory then use this a_doormor.nss void main() { object oDoor = GetObjectByTag("MorgueDoor"); SetLocked(oDoor, FALSE); DelayCommand(1.0, AssignCommand(oDoor, ActionOpenDoor(oDoor))); //test CreateObject(OBJECT_TYPE_PLACEABLE, "mylocker", Location(Vector(-19.48675, 11.91394, 9.11489), 55.0)); } Link to comment Share on other sites More sharing options...
Det. Bart Lasiter Posted November 2, 2005 Share Posted November 2, 2005 @Jedi_Knight_707 Yes, minus the script name ***Edit*** Don't forget to re-name the original script, and name your new script whatever the name of the original one was, and execute the old one in your script. Then just compile both, and put them in your 'Override' folder Basically: Your script is named 'a_doormor' and executes the original that you re-named, perhaps 'a_doormor2'. Link to comment Share on other sites More sharing options...
JediKnight707 Posted November 3, 2005 Author Share Posted November 3, 2005 Does anybody know which script it is? Link to comment Share on other sites More sharing options...
Det. Bart Lasiter Posted November 4, 2005 Share Posted November 4, 2005 I think that, as Darth333 said, it's 'a_doormor'. Therefore your script should be this: void main() { object oDoor = GetObjectByTag("MorgueDoor"); SetLocked(oDoor, FALSE); DelayCommand(1.0, AssignCommand(oDoor, ActionOpenDoor(oDoor))); object oCorpse = GetItemPossessor(GetObjectByTag("plasmatorch")); if (GetIsObjectValid(oCorpse)) { CreateItemOnObject("anakin_saber", oCorpse); CreateItemOnObject("jinn_saber", oCorpse); CreateItemOnObject("luke_saber", oCorpse); CreateItemOnObject("maul_saber", oCorpse); CreateItemOnObject("obiwan_saber", oCorpse); CreateItemOnObject("palpatine_saber", oCorpse); CreateItemOnObject("windu_saber", oCorpse); CreateItemOnObject("yoda_saber", oCorpse); CreateItemOnObject("vader_saber", oCorpse); CreateItemOnObject("koon_saber", oCorpse); CreateItemOnObject("dooku_saber", oCorpse); ExecuteScript("a_doormor_old", OBJECT_SELF); } ... and named 'a_doormor', with the old script (the one oldflash posted) named 'a_doormor_old'. Link to comment Share on other sites More sharing options...
JediKnight707 Posted November 5, 2005 Author Share Posted November 5, 2005 Awesome, I'll see if that works thanks jmac Link to comment Share on other sites More sharing options...
Darth333 Posted November 5, 2005 Share Posted November 5, 2005 Err...the script already contains all the a_doormor.ncs contents so there is no real point in re-executing the script at the end. The original contents of a_doormor.ncs are: void main() { object oDoor = GetObjectByTag("MorgueDoor"); SetLocked(oDoor, FALSE); DelayCommand(1.0, AssignCommand(oDoor, ActionOpenDoor(oDoor))); edit: I just tried the following script (had to change the items because I don't have yours) and it worked perfectly: void main() { object oDoor = GetObjectByTag("MorgueDoor"); SetLocked(oDoor, FALSE); DelayCommand(1.0, AssignCommand(oDoor, ActionOpenDoor(oDoor))); object oCorpse = GetItemPossessor(GetObjectByTag("plasmatorch")); if (GetIsObjectValid(oCorpse)) { CreateItemOnObject("a_helmet_01", oCorpse); CreateItemOnObject("a_helmet_02", oCorpse); CreateItemOnObject("a_helmet_03", oCorpse); CreateItemOnObject("a_robe_08", oCorpse); CreateItemOnObject("a_robe_09", oCorpse); } } So you must be doing something wrong because it's not the script. Double check the resref of your items and make sure you can acquire them with cheats. If you can't get your items with cheats in the game, then the problem is likely there. Make sure that each time you want to test the script you start a game from before opening the morgue door. Link to comment Share on other sites More sharing options...
Det. Bart Lasiter Posted November 6, 2005 Share Posted November 6, 2005 Link to comment Share on other sites More sharing options...
JediKnight707 Posted November 7, 2005 Author Share Posted November 7, 2005 Err...the script already contains all the a_doormor.ncs contents so there is no real point in re-executing the script at the end. The original contents of a_doormor.ncs are: void main() { object oDoor = GetObjectByTag("MorgueDoor"); SetLocked(oDoor, FALSE); DelayCommand(1.0, AssignCommand(oDoor, ActionOpenDoor(oDoor))); edit: I just tried the following script (had to change the items because I don't have yours) and it worked perfectly: void main() { object oDoor = GetObjectByTag("MorgueDoor"); SetLocked(oDoor, FALSE); DelayCommand(1.0, AssignCommand(oDoor, ActionOpenDoor(oDoor))); object oCorpse = GetItemPossessor(GetObjectByTag("plasmatorch")); if (GetIsObjectValid(oCorpse)) { CreateItemOnObject("a_helmet_01", oCorpse); CreateItemOnObject("a_helmet_02", oCorpse); CreateItemOnObject("a_helmet_03", oCorpse); CreateItemOnObject("a_robe_08", oCorpse); CreateItemOnObject("a_robe_09", oCorpse); } } So you must be doing something wrong because it's not the script. Double check the resref of your items and make sure you can acquire them with cheats. If you can't get your items with cheats in the game, then the problem is likely there. Make sure that each time you want to test the script you start a game from before opening the morgue door. Well, crap. I don't know what I'm doing wrong Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.