Add Destroyed Only trigger event - #1592
Open
JoyfulShush wants to merge 11 commits into
Open
Conversation
Introduce a new extended trigger event EXT_TEVENT_DESTROYED_ONLY and wire it into the event system. Add the enum entry in vinifera_defines.h, register the event as attachable to objects in tevent hooks, and add an object hook that fires the event when an object with an attached tag is destroyed by taking damage (captures/sales/house-changes do not trigger it). Also add necessary includes in objectext_hooks.cpp to support tagging and event triggering.
|
This comment is automatically generated by Nightly.link and allows non-registered users to get download the artifacts for this pull request. These links are also updated when the pull request is pushed to. |
ZivDero
requested changes
May 29, 2026
Comment on lines
+395
to
+398
|
|
||
| case EXT_TEVENT_DESTROYED_ONLY: { | ||
| if (event != Event) return false; | ||
| } |
Member
There was a problem hiding this comment.
This is sus... Why is this required for this event, but not for any of the vanilla ones? =
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A new trigger event that strictly occurs only when attached object is destroyed.
To use this, add the following event to WAE's events in the file at the end of the file:
Map Editor/Editor/Config/Default/Events.ini