Jump to content

.getInventory() for Living Zombies?


PunkyRoo

Recommended Posts

Hello!

 

So for one of my mods I'm trying to manipulate what's in a Zombie's inventory while they are still alive.  But methods like:

zombie:getInventory():AddItem("MyItem") 

does not seem to work while the zombie is still alive.  For example, I was using it while hooking into the OnWeaponHitCharacter event and it did not work. 

 

BUT, that will work after the zombie is dead.  For example, when it is inside the OnZombieDead event.

 

I noticed in the Java Docs that there is a DoZombieInventory() method that I was hoping initialized a Zombie's inventory, but calling this before and after the manipulation code had no effect.

 

So, is it possible to access and manipulate a Zombie's library while they are still alive?  If so, how?

 

TIA,

-PunkyRoo

Link to comment
Share on other sites

  • 2 years later...

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
×
×
  • Create New...