You should all be proud of me. I worked this lil fucker like a champ and I’ve come to the conclusion that there’s a bug.
I have the following npcs:
// NPC made by traddles
if (created) {
setimg door.png;
}
if (playertouchsme) {
toweapons test;
}
if (weaponfired) {
triggeraction 32,32,setdir,17;
}
~note~ the below npc is placed on 32,32 (which I validate by saying “xy”).
if (created) {
setimg gate1.png;
}
if (actionsetdir) {
message here I am, being triggered;
}
if (playerchats && strequals(#c,xy)) {
message #v(x),#v(y);
}
Now, if I take up the first npc as a weapon and fire it, nothing happens to the second npc. Now if I just change the line:
setimg gate1.png;
to
setimg door.png;
suddenly firing the weapon DOES cause the second npc to say “here I am, being triggered”.
I went through every image in levels/images and I think I’ve figured out the pattern. If an image has transparency in it anywhere, then the triggeraction fails.
door.png, arrowsbox.png, door1.png all work but
brother1.png, brother2.png, gate1.png and gate2.png do not work (any of them).
I threw a quick level together to demonstrate in as minimalistic a way as possible what the bug is that I’m seeing.
if you touch the arrowbox it will jump into your weapons. If you fire the weapon it will do a triggeraction on the two npcs to the right. You’ll notice that the two npcs on the right are identical in every way except that one uses an image that has transparency and the other does not. One responds to the triggeraction, the other does not. very strange.
oh cool. No, I wasn’t joking. The line in commands.rtf regarding setshape goes:
How is anyone new to graal supposed to glean from that that npc’s that use an image with transparent pixels must have setshape done to explicitly state what rectangle the npc is blocking?