GeckNoob777 Posted May 24, 2010 Share Posted May 24, 2010 Hey, I am relatively new to modding, and was wondering how I could go about making a script for an activator box that when the player enters it takes away his or her weapons and places them in a container, aswell as removing any ally's items and placing thos is a separate container. Also, how can I make sure this effect is indefinite until completion of a quest. I would really appreciate the help, thanks. Link to comment Share on other sites More sharing options...
Swordfish42 Posted May 24, 2010 Share Posted May 24, 2010 Try this script attached to MYCONTAINER scn Mymodlooseitems Begin onload ;this will run the script once when the container's 3D has been loaded. Disable ;This will make the container Inaccessible and invisibleIf (Player.GetInCell MYCELL == 1) && (GetStage MYQUEST == 10) ; checks if the player is in the same cell as the player and if the quest has begun. I assume that the first stage of the quest will be '10', but it can be whatever.player.RemoveAllItems MYCONTAINER, 1 ;removes player's items and adds them to MYCONATINER, and retains their ownership (so stolen objects will still cont as stolen) elseif (Player.GetInCell MYCELL == 1) && (GetStageDone MY QUEST 100 == 1) ;checks if the player is in the same cell as the box and if the quest is complete. The quest should be comlete after stage '100'enable ;This will make the box 'appear' and allow the player to access the boxendifend you should be able to copy/paste this directly into the script writers, but alter the MYXXX to whatever is necessary. My notes start with a semi-colon, so the script will ignore the notes, meaning they wont get in the way if you paste them as well.MYCONATINER should be a reference, and not an object id. By that, i mean when you double click on an object in cell view, there are some boxes at the top of the box that appears. The first is usually blank and the second is always filled. the first is the refernce ID (which you should change to MYCONTAINER or whatever) and the second is the object id, the id of the base object. Also, you should be able to replicate this script for a compainion, except replace 'player.' with 'MYCOMPAINION.' dont forget the full stops. hope that helps do note that i havent tried this in the GECK yet i just guessed, but i check over my writing and i think it should be fine. Message me if there are problems or you have more questions-Swordfish Link to comment Share on other sites More sharing options...
Quetzlsacatanango Posted May 24, 2010 Share Posted May 24, 2010 There is bbcode for (code)(/code) so your scripts will show up correctly. Rather than OnLoad I would create an area that the player has to walk through, and have the script run OnTriggerEnter. You can do your quest status check in the same block to give the player their stuff back when they leave the area. You can have this apply to all NPCs, or you can check for things like getplayerteammate to have it apply to vanilla followers, but depending on how stringent you want to be it can get hard to have it apply to any player followers (SCC followers, for example) but not other NPCs.You still want a container for the stuff to be put in, but you don't need to disable it. Just move it underground or somewhere inaccessible. Link to comment Share on other sites More sharing options...
GeckNoob777 Posted May 25, 2010 Author Share Posted May 25, 2010 Thanks Swordfish and Quetz, this was extremely helpful. I appreciate the help. Link to comment Share on other sites More sharing options...
Recommended Posts