Jump to content
  • 0

How do you know which monster killed another monster?


Question

Posted

Hello everyone!
I have a NPC that causes two different aggressive mobs (Poison Spore and Argiope). These monsters kill another mobs.

I also have another NPC that cause Porings.

The task is to find out which monster (Poison Spore or Argiope) kills Poring.

 

Or how to find Poring was killed by a player or a monster summoned by the first NPC?

3 answers to this question

Recommended Posts

  • 0
Posted

 

It is necessary to harness the monster to something.
Example: The monster must be summoned by an "event":
 

monster "YOU_MAP",0,0,"--ja--",MOB_ID,1,strnpcinfo(0)+"::OnMyMobDead1";


This way, when the monster is defeated, it will call the event: OnMyMobDead1
 

OnMyMobDead1:
mapannounce "YOU_MAP","[ Exemple ] : "+strcharinfo(0)+" defeated the monster!",8;
end;


I don't know an easy or simple way to tie the event to a monster or npc.

  • 0
Posted
On 2/15/2021 at 6:34 PM, AIex said:

Hello everyone!
I have a NPC that causes two different aggressive mobs (Poison Spore and Argiope). These monsters kill another mobs.

I also have another NPC that cause Porings.

The task is to find out which monster (Poison Spore or Argiope) kills Poring.

 

Or how to find Poring was killed by a player or a monster summoned by the first NPC?

You can use event labels like @Gladius said to figure it if a monster was killed by a player or another monster, but there is no way to access the information of the killer monster without a source mod

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.   Paste as plain text instead

  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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...