The forum has been set to read-only mode. For community discussion and questions, head over to our Discord: https://discord.taleoftwowastelands.com

Prevent Re-Arming of Traps (Fulfilled)

General mod discussion and requests.
Post Reply
frootzcat
Posts: 76
Joined: Fri Nov 15, 2013 7:35 pm
Location: Somewhere
Contact:

Prevent Re-Arming of Traps (Fulfilled)

Post by frootzcat » Fri Aug 01, 2014 4:33 pm

Hello. My script-fu is still pretty basic as I learn my way through the GECK, and I wanted to request a mod that I'm not sure how to go about making.


Basically I want to disable the ability to re-arm traps, such as computers or baby carriages; I'd like to be able to still DISARM live traps. But I always wind up accidentally blowing myself back up by accident when I rush through menus and happen to then be standing right next to a newly-made-live explosion object.


Yes, this would be a cheat, but if you don't like the idea, don't bother modding it. I could also probably make this myself if I had an idea where to START from.


My Pixiv / Meddy #2520 on Discord

TJ
Posts: 2181
Joined: Mon Sep 17, 2012 1:06 pm

Take your activator (bear

Post by TJ » Fri Aug 01, 2014 5:10 pm

Take your activator (bear trap or whatever) and apply a script. The script should say something of the effect of


scn whatever


int doonce


Begin OnActivate


     if getactionref == player && doonce != 1


           set doonce to 1


           activate


     endif


END


You'll need to add that to the base item of every activator.


EDIT: A thought just occurred to me that these are probably already scripted. In which case you'd need to just add the missing parts to the scripts in use. If doonce is already used, you can name your int anything, so long as the if check is also renamed.


My project Dash is on Kickstarter!



frootzcat
Posts: 76
Joined: Fri Nov 15, 2013 7:35 pm
Location: Somewhere
Contact:

Thank you, TJ!

Post by frootzcat » Fri Aug 01, 2014 5:27 pm

Thank you, TJ!


My Pixiv / Meddy #2520 on Discord

Post Reply