Psychotogen Posted August 16, 2017 Share Posted August 16, 2017 I'm trying to make the game a bit more challenging and would like to cap the amount of ammo that can be taken along outside of the carry weight capacity. Would appreciate someone pointing me in the right direction. Thanks in advance! Link to comment Share on other sites More sharing options...
JonathanOstrus Posted August 16, 2017 Share Posted August 16, 2017 (edited) I'm trying to make the game a bit more challenging and would like to cap the amount of ammo that can be taken along outside of the carry weight capacity. Would appreciate someone pointing me in the right direction. Thanks in advance!There's no straight forward way to do what you describe. But you could make a quest with an alias for the player. Place a script on the alias with an OnItemAdded event and check the transfer item matches your criteria. Then get the count of how many the player has. If it exceeds your desired value then remove said excess to another container. One issue I see up front is handling if the player is buying said items. They'll be paying for them when it transfers, so you wouldn't want to put the excess back in the originating container. Edited August 16, 2017 by BigAndFlabby Link to comment Share on other sites More sharing options...
Psychotogen Posted August 19, 2017 Author Share Posted August 19, 2017 Thank you. I'll give it a shot. Link to comment Share on other sites More sharing options...
JonathanOstrus Posted August 19, 2017 Share Posted August 19, 2017 (edited) Thank you. I'll give it a shot. I also forgot to mention you can put a filter on it so you only get events for the objects you want. See the wiki page AddInventoryEventFilter_-_ScriptObject Edited August 19, 2017 by BigAndFlabby Link to comment Share on other sites More sharing options...
Recommended Posts