View Full Version : Custom items

25-07-2016, 02:35 PM
I'm trying to make a custom item and I have a couple of questions.
First: assuming that custom items have to inherit from ScriptBasePlayerItemEntity, which method of that is called when the item is picked up? Or rather where should I place the code that gives the item to the player/applies its effects/plays the pickup sound/etc.?
Second: I want the item to act as a powerup in that its effect should get removed from the player after some time passes. How would I go about that?
Third: is there anything that I have to do to handle the item's respawn? Or is it all in the base class and I just have to set the respawn time somewhere?
And I know about item_inventory, but I can't quite make what I want using it.