Skip to content

Set SELF to trigger instigator in oCTriggerScript (#911) - #1026

Closed
kroplabeskidu wants to merge 1 commit into
Try:masterfrom
kroplabeskidu:fix-911
Closed

kroplabeskidu wants to merge 1 commit into
Try:masterfrom
kroplabeskidu:fix-911

Conversation

@kroplabeskidu

Copy link
Copy Markdown
Contributor

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

touch, trigger, triggerlist and mob events now pass the npc that caused them, same as vanilla
std::string emitter;
Type type = T_Trigger;
uint64_t timeBarrier = 0;
Npc* instigator = nullptr;

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing save/load support

@kroplabeskidu kroplabeskidu closed this by deleting the head repository Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Temple trap is not killing me

2 participants