I am looking for a way to assign a button on the keyboard/controller that will activate an object that has multiple uses, and after all the uses are used, it removes the item from your inventory. Any help is appreciated!
You could use the actionslots, and check when a player is using them
for example
Code Snippet
Plaintext
player SetActionSlot( 4, "weapon", "c4" );
Awesome! Now I just need to know how to make it have limited uses. Double Post Merge: December 26, 2016, 02:59:48 amIf it helps any, this is my script: http://paste.md-5.net/sijedosiqa.coffee
Last Edit: December 26, 2016, 02:59:48 am by HyperFirez
Cant you just set the maxammo of that 'weapon' to the number of max uses you want? You could check in your script if the ammocount is 0 and if it is take the 'weapon' from the player.
Spoiler: click to open...
If you want to make sure players dont get a max ammo and refill their gumballs, change the max-ammo script in _powerups into this:
I don't want to set the amount of ammo a weapon has. I want to limit the amount of powerups that spawn. If you couldn't tell, I am making a gobblegum script. The "Cache Back" gobblegum, lets you spawn in 3 max ammos. I want to make it after that 3rd use, it takes the gumball away from you.
I don't want to set the amount of ammo a weapon has. I want to limit the amount of powerups that spawn. If you couldn't tell, I am making a gobblegum script. The "Cache Back" gobblegum, lets you spawn in 3 max ammos. I want to make it after that 3rd use, it takes the gumball away from you.