For some reason "opby_class" doesn't work in the following situation:
A trigger inside a wall, an alcove, when putting the right item in the alcove.
I use that because I want to use "const_weight" and alcoves don't have this option.
I looked in the base code and did not find the reason.
I carefully checked, compiled and tried to modify the situation. It works with :
opby="waterskin"
but not with:
opby_class="WATERSKIN"
(fixed) Weird trigger bug
Moderator: Sophia
Forum rules
Please read the Forum rules and policies before posting. You may
to help finance the hosting costs of this forum.
Please read the Forum rules and policies before posting. You may

- Sophia
- Concise and Honest
- Posts: 4307
- Joined: Thu Sep 12, 2002 9:50 pm
- Location: Nowhere in particular
- Contact:
Re: (fixed) Weird trigger bug
I don't know how this one managed to survive for so long.
Around line 421 of triggers.lua, replace this:with:

Around line 421 of triggers.lua, replace this:
Code: Select all
if (thing_arch.class == obj[exvar[id].opby_class]) then
Code: Select all
if (thing_arch.class == exvar[id].opby_class) then
Re: (fixed) Weird trigger bug
There are two more references to this 'obj' object in the lines above the code. It also appears in the blocker_no_monsters function. Is it some kind of magic über object that exists globally?!
- Sophia
- Concise and Honest
- Posts: 4307
- Joined: Thu Sep 12, 2002 9:50 pm
- Location: Nowhere in particular
- Contact:
Re: (fixed) Weird trigger bug
obj is just the table of all objects, as defined in objects.lua.
For any arch name, obj[arch_name] is just a reference to its table entry.
So yes, I guess it kind of is.
For any arch name, obj[arch_name] is just a reference to its table entry.
So yes, I guess it kind of is.

Re: (fixed) Weird trigger bug
<The sound of the palm slapping a forehead> Doh! Oh I knew that. gfx is for graphics and snd is for sound, etc. Thanks!