Talk:Script types

From ZDoom Wiki
Jump to navigation Jump to search

I'm trying to put experience on monsters in order for my player to level up.
Would it be possible that someone add a script type?
I'm looking for something that would know when a player kills something, monster or player.
Taking a target ID by a script argument would NOT work because of summons, thingSpawnFacing().
The best way, in my opinion, is to create a script type 'kill' that executes each time a player kills something.
This would also disable experience gained from a monster killing another one!

Edit: I discovered that skulltag uses "%o" for knowing the victim in obituaries (classes properties).
      Is there a way to do the same with the script editor?

It's a suggestion. That would be insane.

Normally, when an actor kills another actor, the killer becomes the target of the killed actor. So with that knowledge, you can have the monsters call A_GiveToTarget in their death states, giving an inventory item which represents experience points. The item (experience points) will be given to the target (the killer). — Blue Shadow (talk) 10:26, 19 February 2015 (CST)

-Tank you really much for the answer my friend.