Jump to navigation Jump to search
Actor A_DropItem (class<Actor> item [, int dropamount [, int chance]])
- item: The item to drop. This can be any valid actor class, not just inventory.
- dropamount: The inventory amount the dropped item contains. This is only meaningful with actors inheriting from the Inventory class. If dropamount is greater than 0, the amount of inventory gained from picking up the item equals exactly to that number. Otherwise, the amount gotten is the same as the amount defined by the item itself, except for ammo items, which in this case, the amount is determined by the current skill level's DropAmmoFactor. Default is -1.
- chance: The probability of the drop. The item is never dropped if this is -1 or less, while it is always dropped if this is 255 or greater. Default is 256.
Returns a pointer to item if it was dropped successfully, otherwise it returns null.
|Note: This article lists no examples. If you make use of this feature in your own project(s) or know of any basic examples that could be shared, please. This will make it easier to understand for future authors seeking assistance. Your contributions are greatly appreciated.|