DropInventory
Jump to navigation
Jump to search
Note: This function is for ACS. For the ZScript function of the same name see DropInventory (ZScript). |
void DropInventory (int tid, str itemtodrop);
Usage
Drops to the ground the specified item from the inventory of the actor or actors with the matching tid. The item has to be present in the inventory in order for it to be dropped. With each call of the function, only one sample of the specified item is dropped.
If tid is 0, the item is dropped from the script activator's inventory.
Parameters
- tid: the tid of the actor or actors from which the item is to be dropped.
- itemtodrop: the item to be dropped.
Examples
This script will drop a shotgun from the activator of the script, provided that the activator has a shotgun in their inventory, of course.
Script 1 (void) { DropInventory(0, "Shotgun"); }