Jump to content
  • 0

Inventory Item not working


NeptunesTyrant

Question

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?

Quote

Actor DFPlayer : DoomPlayer
{
Player.StartItem "FlashlightCentered"
Player.StartItem "Axe"
Player.StartItem "Sanity" 100
DamageFactor Insanity, 1.0
PainChance Insanity, 255
 States
 {
  Pain.Insanity:
  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
    +COUNTITEM
    +INVENTORY.INVBAR
    Inventory.Pickupmessage "Some Anti-Psychotics."
    Inventory.PickupSound "Misc/I_PkUp"
    Inventory.UseSound "FieldKit/Use"
    Inventory.Icon "SMBSA0"
    Inventory.MaxAmount 5
    Scale 0.75
    States
    {
    Spawn:
        SMBS A -1
        stop
    Use:
        TNT1 A 0 A_GiveInventory("Sanity",25)
        stop
    }
}

 

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
}

 

Edited by Aquila Chrysaetos

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...