ClearActorInventory

From ZDoom Wiki
Jump to: navigation, search

void ClearActorInventory(int tid);

Usage

This function will clear the actor specified's inventory in a similar fashion to ClearInventory.

Examples

This could be a very nasty piece of code if implemented into a deathmatch level. Every five minutes, a player will be picked at random and stripped of their inventory.

script 1 enter
{
    Thing_ChangeTID(0, 1000 + PlayerNumber());
}

script 2 open
{
    int p;
    while (TRUE) 
    {
        delay(35 * 60 * 5);

        do {
            p = random(0, 7);
        } while (!PlayerInGame(p));

	ClearActorInventory(1000 + p);
        HUDMessageBold(n:p+1, s:" is begging for a quick death!";
            HUDMSG_FADEOUT, 1, CR_RED, 0.5, 0.5, 3.0, 1.0);
    }
}
Personal tools
Namespaces

Variants
Actions
Navigation
ACS
DECORATE
ZDoom mods
Toolbox