Use case:
Code: Select all
actor MyMedkit : CustomInventory
{
tag "$MY_MEDKIT_TAG" // "Localized Medkit"
inventory.pickupMessage "$MY_MEDKIT_PICKUP" // "You picked up a localized medkit."
// ...
states
{
// ...
Use:
TNT1 A 0 A_JumpIfHealthLower(200, 2)
TNT1 A 0 A_Print("$MY_MEDKIT_FAIL") // "You cannot heal right now."
fail
TNT1 A 0 A_GiveInventory("HealthBonus", 25)
TNT1 A 0 A_Print("$MY_MEDKIT_USE") // "You restored some health."
stop
}
}