Zynoq Posted February 11, 2008 Posted February 11, 2008 Is it possible to put a script on a container so it triggers a trap when you open it?
LoginToDownload Posted February 11, 2008 Posted February 11, 2008 It's both doable and has been done before. If you're looking for a specific chest, try attaching a script going something like...scn TrappedChestScript ref victim short DoOnce Begin OnActivate set victim to GetActionRef if (DoOnce == 0) ;If there are other ways to avoid triggering it, those should be added to the above if-loop as well. cast StandardFireDamageArea3Journeyman victim set DoOnce to 1 else activate victim endif end One potential way of avoiding the trap could be to hit the chest with a shock effect, in which case you'd add the following to the script. Begin OnMagicEffectHit SHDG set DoOnce to 1 end
Zynoq Posted February 11, 2008 Author Posted February 11, 2008 That wasn't really the thing i looked for but thanks anyway.I meant more like triggering a log trap behind the player. Is that possible?
LoginToDownload Posted February 11, 2008 Posted February 11, 2008 In all honesty, I'm not very good with activators. Gates and traps don't seem to want to trigger if activated by a different object for some reason, even if it's their parent. However, in theory...scn TrappedChestScript ref victim short DoOnce Begin OnActivate set victim to GetActionRef if (DoOnce == 0) TrappedLogs.Activate set DoOnce to 1 endif activate victim end
Zynoq Posted February 11, 2008 Author Posted February 11, 2008 Cool i'll try that out. And thanks again.
wizardmirth Posted February 12, 2008 Posted February 12, 2008 Depending on the activator, there may be a GetIsPlayer check in order for it to work. To get around this you need to declare and set a GetSelf ref in the script for the other activator.
LoginToDownload Posted February 12, 2008 Posted February 12, 2008 Thanks, but I've tried "Activate Self" as well, with little success. At any rate, I wouldn't imagine that would be an issue for log-traps.
Zynoq Posted February 12, 2008 Author Posted February 12, 2008 Ok im stuck i have no idea how to rig the trap, any help?
LoginToDownload Posted February 12, 2008 Posted February 12, 2008 One way I've seen is to create a form of ramp extending from the ceilding, just large enough to hold the logpile. Doesn't get in the way of the player on his way in, and still squishes him after he triggers it.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.