David Brasher Posted April 21, 2009 Share Posted April 21, 2009 There were cool traps in Morrowind. You open the door or the container and you get burned, shocked, frozen, or poisoned. You steal that one particular gem from the daedric shrine, and a dremora attacks you from behind. How can I do things like that in Oblivion? Link to comment Share on other sites More sharing options...
jonesjoshuar Posted April 21, 2009 Share Posted April 21, 2009 There were cool traps in Morrowind. You open the door or the container and you get burned, shocked, frozen, or poisoned. You steal that one particular gem from the daedric shrine, and a dremora attacks you from behind. How can I do things like that in Oblivion? scripting. begin onActivate Cast (spell) Player end Link to comment Share on other sites More sharing options...
David Brasher Posted April 22, 2009 Author Share Posted April 22, 2009 Thank you very much! I think you have put me on the right track. I have got my gem and dremora trap working, and am currently working on the chest trap. The containers don't open when they are traps, but there are interesting things to do with them, and I might be able to work around the problem in a devious fashion. Link to comment Share on other sites More sharing options...
Argomirr Posted April 22, 2009 Share Posted April 22, 2009 If you want them to open after casting the trap: ScriptName (Scriptname) Begin OnActivate Cast (Spell) Player Activate End The chest should now open after casting the trap. If you want the trap to be casted once, so the player doesn't get zapped a second time (like the Morrowind traps): ScriptName (Scriptname) Short DoOnce Begin OnActivate If DoOnce == 0 Cast (Spell) Player Activate Set DoOnce 1 EndIf End I prefer using this version, 'cause I think it's kind of stupid that the player gets zappped every time he opens the chest.The problem with these scripts is that if a NPC activates the chest, the player will get zapped instead of him. To fix this: ScriptName (Scriptname) Short DoOnce Ref Target Begin OnActivate Set Target to GetActionRef If DoOnce == 0 Cast (Spell) Target Activate Set DoOnce 1 EndIf End The chest should now cast the spell at whoever tries to activate it (NPC or player). Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.