TakeInventory
Description[edit]
This is an ACS built-in function.
Takes (removes) one or more items from player's inventory.
Usage[edit]
void TakeInventory(str item_name, int amount)
Parameters[edit]
- item_name: name of inventory item or power to remove
- amount: how many to remove. Can be negative, which will remove all.
Return value[edit]
Examples[edit]
No examples given.
Notes[edit]
If amount is 0, it will do nothing.
If not activated by a given player, it will affect all players.
For taking power directly by Power... name, it will reduce by the given tics. If it's infinite (including always berserk), it will just disable it.
For taking health, it will never kill a player, just leave him/her at 1% health minimum.
For taking ammo effects, it will take the amount multiplied by the pick-up amount. If you want to control exact ammo taking, look them up by the artifact name in EDF.
For taking power by item effect name, it reduces the availability in tics, by multiplying by how much each pick-up provides. For berserk it always removes the power.
For taking weapons by giver name, it removes the weapon and also whatever ammo was provided when picking one up.
For taking backpacks, it will remove the ammo bonus, and:
- if amount is less than -1 (e.g. -2 or less), then it will take all the ammo as well
- if amount is exactly -1, only take away the bonus
- if amount is strictly positive, take the ammo-per-backpack multiplied by that amount
This function's identification in zspecial.acs is: ACS internal.