DarkScience Posted January 9, 2010 Share Posted January 9, 2010 What i need is a script wich hooks to a container and makes sure it has all the items on a or multiple form lists. Link to comment Share on other sites More sharing options...
biscut247 Posted January 9, 2010 Share Posted January 9, 2010 So... I dont understand. you want to script a container to make it have a certin item? Link to comment Share on other sites More sharing options...
DarkScience Posted January 9, 2010 Author Share Posted January 9, 2010 What i need is a script which i can hook to a container so that if it doesn't have an item on a form list it will receive the missing item(s). Link to comment Share on other sites More sharing options...
Cipscis Posted January 11, 2010 Share Posted January 11, 2010 You can use a form list as a parameter of AddItem to add a certain amount of every item in a list to a container, but if you want to check each item in a list then you'll need to use FOSE's looping and form list functions. Scripts need to be set up in such a way that the code they contain is triggered by something. For example, the scripted object being activated, or the game being in GameMode for a frame. What do you want to trigger this particular event? Cipscis Link to comment Share on other sites More sharing options...
101Wanderer Posted January 12, 2010 Share Posted January 12, 2010 do you mean like a button that when you press it it'll restock a container? Link to comment Share on other sites More sharing options...
DarkScience Posted January 13, 2010 Author Share Posted January 13, 2010 I want int to bee a timed script so every x time it restocks or every frame though every frame will lag won't it? Link to comment Share on other sites More sharing options...
CommanderCrazy Posted January 13, 2010 Share Posted January 13, 2010 Well, containers set to restock do that every 3 days.(in game, not real :P) Link to comment Share on other sites More sharing options...
DarkScience Posted January 13, 2010 Author Share Posted January 13, 2010 Thanks for the help think i have it under control from here on in. Link to comment Share on other sites More sharing options...
Cipscis Posted January 13, 2010 Share Posted January 13, 2010 It'd probably be best to restock the container whenever it is opened or closed. This should do what you need it to without attempting to do it every frame. Restocking the container every frame wouldn't cause noticeable lag, but it's completely unnecessary anyway. Cipscis Link to comment Share on other sites More sharing options...
DarkScience Posted January 15, 2010 Author Share Posted January 15, 2010 Ok im useing this bit of script but it seems to have no effect.scn ALLBoxAmmoScript ref box Begin OnOpen set box to GetContainer box.RemoveAllItems box.AddItem ALLAmmo 9999 End Link to comment Share on other sites More sharing options...
Recommended Posts