Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 0

Inventory Item not working


I'm trying to get this system to work in Decorate, the Player starts with the 100 Sanity items fine, takes insanity damage fine, but the anti-psychotics when picked up in game goes into the players Inventory but for some reason, it can't be used with the useitem key.


Any Ideas what I've missed?


Actor DFPlayer : DoomPlayer
Player.StartItem "FlashlightCentered"
Player.StartItem "Axe"
Player.StartItem "Sanity" 100
DamageFactor Insanity, 1.0
PainChance Insanity, 255
  PLAY G 4 A_TakeInventory ("Sanity", 10)
  PLAY G 4 A_Pain
  goto Spawn

Actor Sanity : Inventory

actor AntiPsychotics : CustomInventory 17005
//$Category Health and Armor
    Inventory.Pickupmessage "Some Anti-Psychotics."
    Inventory.PickupSound "Misc/I_PkUp"
    Inventory.UseSound "FieldKit/Use"
    Inventory.Icon "SMBSA0"
    Inventory.MaxAmount 5
    Scale 0.75
        SMBS A -1
        TNT1 A 0 A_GiveInventory("Sanity",25)


Share this post

Link to post

2 answers to this question

Recommended Posts

  • 0

I spent a few minutes looking and I finally figured it out.

Your Sanity items don't have a specified maximum amount defined.

This should fix it:

actor Sanity : Inventory
 Inventory.Amount 1 //This shouldn't affect anything, but I put it here just to be safe.
 Inventory.MaxAmount 100


Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now