Currently WorldThingDestroyed only contains the actor that was destroyed. I'd request that the actor who caused the desctruction (if not NULL) can be added as well.
I mean e.g. for items. A player picks it up, the item gets destroyed. So the desctruction of this item was initialized by said player.
This would simplify adding certain effects for the actor who picks it up, instead of having to edit all items seperately.
Alternatively, would it be possible to add "WorldThingPickedUp" in general? It should also contain the actor that gets picked up (Item) and the actor that picked it up (Toucher) and it should be handled before item is applied to the toucher.
The idea behind those are, that you can e.g. make a mod, where you get a penalty for picking up too many Medkits. E.g. after you pick up a certain amount you only get half of what it would originally give. Yes, you could easily do so with editing all existing health items, but via WorldEvents it would add a far easier compatibility for other mods, since in the EventHandler you can only check if it inherits from e.g. "Health", without the need to replace all actors of other mods as well.
The same thing I guess could be used for WorldThingDied (who caused the actor to die), also for WorldThingRevived (who revived said actor) and WorldThingSpawned (who spawned the actor).
Extending Data for WorldThingDestroyed
Moderator: GZDoom Developers
-
- Posts: 219
- Joined: Wed Jan 08, 2014 8:40 am
- Graphics Processor: nVidia with Vulkan support
- Location: Germany
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Extending Data for WorldThingDestroyed
An actor has no 'destroyer'. You are thinking about killer, but that's an entirely different action. 'Destroy' actually means the object was removed from the map.
-
- Posts: 219
- Joined: Wed Jan 08, 2014 8:40 am
- Graphics Processor: nVidia with Vulkan support
- Location: Germany
Re: Extending Data for WorldThingDestroyed
Well, I mean for the inventory items that they get destroyed after being picked up. So the actor that picked it up successfuly in the first place is "kind of" the one who initialized the desctruction. But I get what you mean.
What about the other suggestion?
What about the other suggestion?
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Extending Data for WorldThingDestroyed
You are completely misinterpreting how this event works.