Xynion Posted March 28, 2013 Share Posted March 28, 2013 Hey guys! I tried to write a script to hide (or to disable) a (dead) NPC after passing the linked trigger-box. That's my script: ScriptName ZModLetsHideSCRIPT Short DoOnce ref ZModDCorpseRef Begin OnTrigger if DoOnce == 0 ZModDCorpseRef.disable set DoOnce to 1 endif End I want the corpse to be there and to disappear once (after the player touched the triggerbox), nothing more, but I do not figure out how this might work. I suppose the error to be at the Ref-line (the NPC's ID is ZModDCorpse without Ref), but I'm not sure how to fix this problem. Looking forward for every help! Link to comment Share on other sites More sharing options...
jazzisparis Posted March 28, 2013 Share Posted March 28, 2013 You must use the unique reference editor ID (which in this case, if I understand correctly, is 'ZModDCorpse'). ZModDCorpseRef is just a declared variable in your script, but with no assigned value.Try this script, instead: scn ZModLetsHideSCRIPT begin OnTriggerEnter player ZModDCorpse.Disable Disable MarkForDelete end Link to comment Share on other sites More sharing options...
Xynion Posted March 28, 2013 Author Share Posted March 28, 2013 Mhh, GECK doesn't allow to save the script... Link to comment Share on other sites More sharing options...
becauseofreasons Posted March 28, 2013 Share Posted March 28, 2013 (edited) Go to where you placed the corpse in the game world, and double-click on him. By my understanding, if you haven't given him anything in the way of a Reference Editor ID, the game won't know which instance (even if there's only one) you're talking about. Fill in a name for him and then use that in your script in place of ZModDCorpse, and you should be good. Edited March 28, 2013 by becauseofreasons Link to comment Share on other sites More sharing options...
Xynion Posted March 28, 2013 Author Share Posted March 28, 2013 Works perfectly. Thanks for the quick support, you helped me a lot! Link to comment Share on other sites More sharing options...
becauseofreasons Posted March 28, 2013 Share Posted March 28, 2013 Awesome! Best of luck! Link to comment Share on other sites More sharing options...
jazzisparis Posted March 28, 2013 Share Posted March 28, 2013 You should also make sure the 'Persistent Reference' box is checked. Link to comment Share on other sites More sharing options...
Recommended Posts