MichikoUnknownFox Posted December 1, 2007 Share Posted December 1, 2007 Hey guys. My first post on the forum heheh. I'm new to this whole modding thing so be patient with me please. Anyway, my question is really simple. I'm trying to make a script (for various purposes) that can cause the player and/or any NPC that touches something to become paralyzed (or other effects, but paralysis is my main target for now), often only by a chance. If that wasn't very clear, let me illustrate. Let's say I want to make a trap script for a treasure chest. If I try to open it without disarming the trap, the trap sets off around me, and I end up with a 30% chance to become paralyzed for 5 seconds or something. I already figured out how to make normal damage traps by looking at other scripts (simple modav health stuff), but I haven't found the script command to make the player paralyzed anywhere. And yeah I tried searching here and on other forums and databases, and people seem to just talk about the spell itself rather than put it in a script. For my scripting purposes though, I think I'd rather do the whole thing in a script, if it's at all possible. If anyone could point me in the right direction, I'd be grateful. :D - edit:Okay I played around with it a bit and did some more research and I finally found out how to set somebody into paralysis via commands (apparently it's a value you can set with setav). But I still have a problem. I can't seem to figure out how to get a timer working for it. I tried following the format prescribed here, but it doesn't seem to work. I mean, my test subjects get paralyzed with no problems, but they never seem to be able to break out of the paralysis, even if I set it up so that Paralysis is set back to 0 after the timer goes down to 0. Is there something I'm doing wrong? Is there a more effective way to script this? Link to comment Share on other sites More sharing options...
Vagrant0 Posted December 1, 2007 Share Posted December 1, 2007 You might just want to make it so that the chest casts a spell on the person opening it, rather than adding an ability through scripting. Activators, containers, and doors can cast spells too. I've also found that using getseconds passed can cause problems. Unless you're actually aiming for a very specific timing, you can just use the script cycles to count down the effect. It isn't as percise as getsecondspassed, but it's a bit easier to do, and will compensate for people who have slow games. The advantage of using a spell base to apply the affect is that you can make adjustments to the effect easier, and can use all the standard effects in addition to any scripts, and have them duration based without having to fool with timers. Link to comment Share on other sites More sharing options...
MichikoUnknownFox Posted December 2, 2007 Author Share Posted December 2, 2007 Thanks, I'll try that for now. But I was trying to avoid the spell option because I like giving myself (and companion NPCs) high magic resist, which kinda takes away from having to disarm the trap. I was hoping for some kind of option that would bypass the spell process so that even if I had say 100% magic resist or reflect, I can still be paralyzed if I'm not careful. Link to comment Share on other sites More sharing options...
Vagrant0 Posted December 2, 2007 Share Posted December 2, 2007 Thanks, I'll try that for now. But I was trying to avoid the spell option because I like giving myself (and companion NPCs) high magic resist, which kinda takes away from having to disarm the trap. I was hoping for some kind of option that would bypass the spell process so that even if I had say 100% magic resist or reflect, I can still be paralyzed if I'm not careful.Fairly sure that spell effects cast from activators aren't resisted like those cast by NPCs. But havn't really looked into it, so may be wrong. If that's the case, the answer is simple, make the chest give the user a weakness to magic before casting the spell by adding an ability to that individual through scripting. Then use another script tied to the spell that removed that ability from the person when the duration runs out. essentially scn whatevertrapscript short triggered ref self ref target begin onactivate if triggered != 1 set self to getself set target to getactionref target.addspell <ID of ability> self.cast <ID of spell> target set triggered to 1 activate, 1 end then in a script attached to the spell scn whatevereffectremover ref self begin scripteffectfinish set self to getself self.removespell <ID of ability> end Or something to that effect. This way it causes the person's spell resistances to be temporarily lowered before the spell hits. The remover script could use a "scripteffectstart" block instead of finish if you don't want the lowered resistance to persist along with whatever effect. As the lowered resistance is tied to an ability added through a script, it cannot be resisted. You could always just toggle "bypass spell resistance" in the spell window for that spell, and just bypass all this if you really wanted. :) Link to comment Share on other sites More sharing options...
LoginToDownload Posted December 2, 2007 Share Posted December 2, 2007 Or you could cut out the middle-man and just add a paralyze/scripted timer "ability"... Adding a "Weakness to Magic" slot still doesn't stop Paralysis resistance, though maybe you want that to still apply... Link to comment Share on other sites More sharing options...
MichikoUnknownFox Posted December 2, 2007 Author Share Posted December 2, 2007 Thanks for all the tips. I didn't do it exactly the way you said but it worked out after I made changes from your advice and reading up some more about the different magic effect functions. The paralysis effect works fine now and it goes through magic resistance just like I want it to, because the trap isn't supposed to be a magic trap anyway. It's like a paralysis cloud or something haha. Anyway thanks again for all the help. I'll continue working on my scripting so I can get better like you guys. :D Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.