razzy1319 Posted July 6, 2011 Share Posted July 6, 2011 I've trying to make a weapon rack with a container function. I already have a working model: http://img19.imageshack.us/img19/4175/weaprackrender.jpg Ive somewhat been looking at UHNV's process in doing this. Thanks to danthegeek's method!So the weapon rack itself will be a container and the guns that are gonna be on it are to be activators. What happens is that when I put in a specific model of a gun, the script checks the amount and depending on this the activators ENABLE thus are rendered visible on the rack. Here is the part where I am stuck at the moment. Because the guns are activators they can be set to be TAKEN, which is easy enough(just disable them right?) But the big conundrum is how 1 random gun from the container with its current health be transferred to the player's inventory? I've looked at the GECK functions list and the NVSE functions list and the only thing that comes to what I want to happen is the REMOVEME function(its the only one that maintains the health of the weapon when transferring). But the documentation states that its buggy outside of the ONADD blocktype and I dont think that I will be using ONADD in any of the scripts I will be doing for this mod. Any ideas? suggestions? or better ways to deal with this? Thanks! Link to comment Share on other sites More sharing options...
MotoSxorpio Posted July 6, 2011 Share Posted July 6, 2011 http://geck.bethsoft.com/index.php/Begin <---here is where block types are explained. Seems to me you would rather do an OnEquip or just straight GameMode unless there are a list of other things you want to do as the weapon is taken from the rack. With GameMode, a simple "if ( player.GetItemCount {objectID} == 1" newline: "if ( player.GetHealth {ObjectID} < {int}" then proceed "if ( player.GetItemCount {objectID} == 0" return? Link to comment Share on other sites More sharing options...
razzy1319 Posted July 7, 2011 Author Share Posted July 7, 2011 Thanks. I get what youre saying. But doesnt that code only checks if a certain weapon is in the container? and checks if its above a certain health percentage? What I what to happen is that it gets the weapon out of the container and into the players inventory. The removeme function supposedly does this but only does so within an OnAdd block without crashes. Are there other functions that do something like this? Or do I have to do this manually? meaning clone a weapon from the container additem it into the player's inventory then remove it from the container? Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts