philios82 Posted October 3, 2011 Share Posted October 3, 2011 Hi folks, I'm trying to make a script so that when an object is given to the player a specific NPC dies. No matter what I do it wont save in the Geck, from what I understand this means that there is an error in the script? It's a very simple script and I can't see whats wrong with it, I've run it through Cipscis's Script validator and that finds no errors. Hopefully someone can spot my mistake. scn killSarah int Myvar Begin OnAdd player if Myvar == 0 PGONPC02Sarah.killactor set Myvar to 1 endifEnd Cheers. Link to comment Share on other sites More sharing options...
AlexxEG Posted October 3, 2011 Share Posted October 3, 2011 (edited) Use this with the GECK: http://www.newvegasnexus.com/downloads/file.php?id=41642It will tell you what is wrong when you're trying to save. Only thing I can see that can possibly be wrong is the "PGONPC02Sarah" reference. Edited October 3, 2011 by Alexx378 Link to comment Share on other sites More sharing options...
philios82 Posted October 3, 2011 Author Share Posted October 3, 2011 Use this with the GECK: http://www.newvegasnexus.com/downloads/file.php?id=41642It will tell you what is wrong when you're trying to save. Only thing I can see that can possibly be wrong is the "PGONPC02Sarah" reference. Thanks I didn't know that the geck Power up had been updated! Link to comment Share on other sites More sharing options...
AlexxEG Posted October 3, 2011 Share Posted October 3, 2011 No problem. I hope it works out. :) Link to comment Share on other sites More sharing options...
Sunnie Posted October 3, 2011 Share Posted October 3, 2011 (edited) killactor can only be used on object references and reference variables. You need to use the actor's reference ID from the cell it's in. For example, in the Goodsprings Saloon, GSSunnySmiles is the actors editor ID, but her reference ID is SunnyRef. So using my example, the following would be a valid script: scn SomeScriptint Myvar Begin OnAdd player if Myvar == 0 SunnyRef.killactor set Myvar to 1 endifEnd Edited October 3, 2011 by Sunnie Link to comment Share on other sites More sharing options...
philios82 Posted October 3, 2011 Author Share Posted October 3, 2011 (edited) killactor can only be used on object references and reference variables. You need to use the actor's reference ID from the cell it's in. For example, in the Goodsprings Saloon, GSSunnySmiles is the actors editor ID, but her reference ID is SunnyRef. Just tried it and that works, cheers. Edited October 3, 2011 by philios82 Link to comment Share on other sites More sharing options...
Sunnie Posted October 3, 2011 Share Posted October 3, 2011 :thumbsup: Link to comment Share on other sites More sharing options...
philios82 Posted October 4, 2011 Author Share Posted October 4, 2011 Okay now I've spent the last few hours trying to get this script to dismember the NPC, the script runs and the NPC is killed but they never lose a limb. I've tried on all sorts of NPCs. The scrpit is below, any ideas would be welcome. scn killSarah int Myvar Begin OnAdd player if Myvar == 0Sarahref.killactor sunnyref 1 2set Myvar to 1endifEnd Link to comment Share on other sites More sharing options...
Sunnie Posted October 4, 2011 Share Posted October 4, 2011 Look at the scripts involved with the "Three card bounty" quest, when you take the fiend bosses heads it does a dismember of sorts on the corpse. Link to comment Share on other sites More sharing options...
Recommended Posts