RippedPhreak on 23/5/2021 at 23:02
So I released a mission to the world, and it has a bug that somehow my testers and I never found. In the mission, you gather four silver gears to use on gearbox locks to open a bank vault. I used NVStackTrap on the gears so that the stack count is decremented properly. You can use all four gears and the vault door opens.
The problem is that if a player grabs just one or two gears and uses them on the vault door, the other gears in the mission are destroyed for some reason. Which means the mission can't be completed. Why are they destroyed? It's a mystery. There is no link to a DestroyTrap or anything like that.
The basic setup is: Four gearboxes with TrigUnlock, linked to an inverter. Inverter is linked to four gears with StdKey and NVstackTrap. On the gear/keys is frobinfo of World Action: Move, inventory action: none, tool action: script, deselect. Stack Count is set to 1 for each gear. The Slay Result is no effect, to keep the stack from deleting when the player uses it on some random door.
Anyway, just wanted to see if anyone had any ideas to fix this. Maybe some Design Note to be added to the NVStackTrap script?
Thanks....
RippedPhreak on 24/5/2021 at 00:28
Well, I think the fix will be to use four different gears because the problem seems to come from the fact that all four gear boxes have the same Engine Features --> KeyDst property.
trefoilknot on 24/5/2021 at 01:00
Four different gears will fix the problem. Not the most elegant solution, I'm sure, but in a pinch it'll let you upload a bug fix quickly. Be sure to have the bug fix version tested! Don't assume that's it's all good because “I just made this one little change!”
RippedPhreak on 24/5/2021 at 02:15
Very true. Not rushing it out tonight! :eek:
john9818a on 24/5/2021 at 03:08
I peeked inside your mission and it seems that the silver gears do have a DestroyTrap linked to them. There is a RAT (2227) that is linked to the DestroyTrap (3692) that seems to be fulfilled as one gear is used and the remaining gears are destroyed. I agree that it would work if there were four separate gears and not have all four gears destroyed by one process.
Edit: another thought I have is that as each gear is stacked in inventory only the first gear's object number is still current.
RippedPhreak on 24/5/2021 at 13:18
Right but since it's a RAT it should not trigger until all four are used. Plus I deleted the RAT and the problem still happened.
Anyway, I've moved on to using a silver gear, iron gear, bronze gear and a "blue metal" gear...essentially solved.
john9818a on 25/5/2021 at 01:16
ok sounds good. I haven't played the mission yet but I was wondering how anyone was able to see the gears. They all have the Renderer: Has Refs: False parameter set. In dromed I am not able to see the gears even if I move them in front of me.
RippedPhreak on 25/5/2021 at 18:46
I assume it's because they are "Contained" by money boxes.