Jump to content

[Help!] Killing events


Recommended Posts

Can somebody help me?

 

I want to compare a Mod that i've killed to for example a Rabbit.

 

So always if i kill a rabbit something happens.

 

But i dont know how to specify which mob i've exactly killed.

 

Thanks Descus

Link to comment
Share on other sites

@Descus, I think (without knowing from where or under what circumstances you want to trigger this) you should attach a listener for "death" to the rabbit prefab.

 

EDIT: Alternatively, TheWorld pushes the following event:

"entity_death", data = { inst = deadthing, cause = cause, afflicter = afflicter }

then simply test for whether data.inst is a rabbit.

Edited by Mobbstar
Link to comment
Share on other sites

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
 Share

×
×
  • Create New...