Repository navigation
Set SELF to trigger instigator in oCTriggerScript (#911) - #1026
Closed
kroplabeskidu wants to merge 1 commit into
Closed
kroplabeskidu wants to merge 1 commit into
kroplabeskidu wants to merge 1 commit into
Conversation
touch, trigger, triggerlist and mob events now pass the npc that caused them, same as vanilla
Try
reviewed
Oct 26, 2026
| std::string emitter; | ||
| Type type = T_Trigger; | ||
| uint64_t timeBarrier = 0; | ||
| Npc* instigator = nullptr; |
Try
approved these changes
Oct 26, 2026
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.
Fixes #911
the killzone in adanos temple is oCTriggerScript with B_FUNCTION_TOUCH_AND_GET_KILLED, which is just B_KillNpc(self). we called the script without setting self so it never hit the player
in vanilla oCTriggerScript sets SELF to the instigator npc and clears OTHER and ITEM before calling the function. added instigator to TriggerEvent, its set on touch and passed along by zCTrigger, zCTriggerList and mobsi state change (vanilla passes the mob user there too)
instigator isnt saved for delayed events, after load its just null
tested with the save from the issue, spikes kill now