Hi! I was privately asked to share the crossbow trap I worked on ages ago, so I might as well give it to everyone to use.
Here is how it works:
Please do note the custom model files in the models folder!
It is sorta Sotha-glitchy implementation as usual, but it works. I'll write here how it works so you can change it to fit your requirements
0) trigger_once that encapsulates the trap wire:
*hides the active trip wire
*shows inactive trip wire
*triggers wood impact sound
*triggers trigger_once "trap_mechanism"
*shows inactive crossbow
*hides active crossbow
*triggers shooter that fires the arrow
*triggers a speaker for the shooting sound.
2) trip wire model has S&R that disables the trap if frobbed.
3) crossbow arrow has S&R that disables the trap if the arrow is frobbed. Both disablings are done by removing the "trap_mechanism."
4) I've set an opening door to trigger the tripwire to show how the system can interact with world objects like doors.
*frobbing the door triggers a trigger_once that waits 1.75s (the time that the door takes to open fully) and then it triggers the trap_trigger (the one that encapsulates the trip wire.)
And here are the files:
I hope you have a lot of fun with it. I would appreciate if you give me credit in the readme if you use it.
Stay in the shadows folks!