vTemporalZEROv Posted March 25, 2016 Share Posted March 25, 2016 (edited) I am trying to make an ammo limiting mod, this is a small part of it, would this work if I tried to compile it? Keep in mind I am asking about this setup, not the actual script itself, it is missing a name and everything obviously. Event OnInit();-------------------------------------------------------------------------------- Player = Game.GetPlayer() ;-------------------------------------------------------------------------------- int MaxAmmo10mm = 120 ;-------------------------------------------------------------------------------- int 10mmAmmoDrop = (Player.GetItemCount(Ammo10mm) - MaxAmmo10mm) ;-------------------------------------------------------------------------------- If (Player.GetItemCount(Ammo10mm) > MaxAmmo10mm) Player.DropObject(Ammo10mm, 10mmAmmoDrop) Debug.Tracer("Ammo limit for 10mm reached!")EndIf EndEvent Edited March 25, 2016 by vTemporalZEROv Link to comment Share on other sites More sharing options...
Reneer Posted March 25, 2016 Share Posted March 25, 2016 Yes and no. Yes in that the code looks good, no in that it would only run once and the player could simply pick up the ammo again from the ground. Link to comment Share on other sites More sharing options...
vTemporalZEROv Posted March 25, 2016 Author Share Posted March 25, 2016 Yes and no. Yes in that the code looks good, no in that it would only run once and the player could simply pick up the ammo again from the ground.Hmmm how would I make it constantly run? I have a quest set up that checks if the player has more than 120 rounds as an entry point getitemcount, and haven't really touched it much, could I use that somehow? Or would it have to be via this script? Link to comment Share on other sites More sharing options...
Reneer Posted March 25, 2016 Share Posted March 25, 2016 You could use the quest to do it. You would want to use the StartTimer and OnTimer functions to create a looping system, then check in the OnTimer function to see if the player has too much ammo. Link to comment Share on other sites More sharing options...
vTemporalZEROv Posted March 25, 2016 Author Share Posted March 25, 2016 You could use the quest to do it. You would want to use the StartTimer and OnTimer functions to create a looping system, then check in the OnTimer function to see if the player has too much ammo.Are those script functions or something to do with the quest? Link to comment Share on other sites More sharing options...
Reneer Posted March 25, 2016 Share Posted March 25, 2016 You could use the quest to do it. You would want to use the StartTimer and OnTimer functions to create a looping system, then check in the OnTimer function to see if the player has too much ammo.Are those script functions or something to do with the quest? Those are script functions. Link to comment Share on other sites More sharing options...
vTemporalZEROv Posted March 25, 2016 Author Share Posted March 25, 2016 Ah ok thank you. Link to comment Share on other sites More sharing options...
Recommended Posts