DropInventory

From ZDoom Wiki
Jump to: navigation, search

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");
}

See also