JaydoDre Posted September 24, 2012 Share Posted September 24, 2012 (edited) What I want to do sounds simple enough to me: activate an object upon which it moves to the side a little (no need for animation). Any idea how this is done in ck? I see that you can add triggers to objects and that there is like a thousand different ones, but I don't know which one I need or what kind of scripting is involved. I suppose basically I need to place a trigger that upon activation would teleport a static object a few inches? Edited September 25, 2012 by Jedo_Dre Link to comment Share on other sites More sharing options...
JaydoDre Posted September 25, 2012 Author Share Posted September 25, 2012 Also, I forgot to note, once I activate the object again it should move back in its place. It is basically to cover a secret door/compartmentAnyone? Link to comment Share on other sites More sharing options...
Sjogga Posted September 25, 2012 Share Posted September 25, 2012 You could create your own script and then attach it to a button, lever or pullbar. You want to use the "translateto"-function (look it up on the wiki). When I get back home I could give you a script example. Thats not until thursday though. Link to comment Share on other sites More sharing options...
assterixxx Posted September 25, 2012 Share Posted September 25, 2012 Or you could use one of the ingame secret doorways, if you can't wait till thursday. That's just a matter of setting up ref's. Link to comment Share on other sites More sharing options...
JaydoDre Posted September 25, 2012 Author Share Posted September 25, 2012 (edited) Well, i did see videos on how to make a door open via a lever so that I can do, but what I was planning is to have a rug on top of a trapdoor. You "activate" the rug and it moves (teleports) to the side revealing the trap door (which you can then enter normally). The secret passages available in Skyrim are too...not secret. I checked out "translateto" command - that looks like what I need, as long as I can avoid using buttons and can attach it to the object itself. I got no idea how though... Edited September 25, 2012 by Jedo_Dre Link to comment Share on other sites More sharing options...
Sjogga Posted September 27, 2012 Share Posted September 27, 2012 (edited) Attach to the wall Scriptname HiddenDoorScript extends ObjectReference Float Property StartX auto hidden Float Property StartY auto hidden Float Property StartZ auto hidden Float Property EndX = 0.0 auto ; units to move along the X-axis Float Property EndY = 0.0 auto ; units to move along the Y-axis Float Property EndZ = 0.0 auto ; units to move along the Z-axis Float Property StartAngX auto hidden Float Property StartAngY auto hidden Float Property StartAngZ auto hidden Float Property EndAngX = 0.0 auto Float Property EndAngY = 0.0 auto Float Property EndAngZ = 0.0 auto Float Property MoveSpeed = 300.0 auto Float Property RotSpeed = 300.0 auto bool Property isTranslating = False auto hidden Event OnInit() StartX = X StartY = Y StartZ = Z EndX += StartX EndY += StartY EndZ += StartZ StartAngX = self.getAngleX() StartAngY = self.getAngleY() StartAngZ = self.getAngleZ() EndAngX += StartAngX EndAngY += StartAngY EndAngZ += StartAngZ endEvent Event OnTranslationComplete() isTranslating = FALSE endEvent Function Reveal() self.stoptranslation() isTranslating = True self.TranslateTo(EndX, EndY, EndZ, angX, angY, angZ, MoveSpeed, RotSpeed) endFunction Function Hide() self.stoptranslation() isTranslating = True self.TranslateTo(StartX, StartY, StartZ, angX, angY, angZ, MoveSpeed, RotSpeed) endFunction Attach this to an activator. Scriptname HiddenWallButtonScript extends ObjectReference ObjectReference Property WallRef Auto Bool isHidden = true Event OnActivate(ObjectReference akActionRef) if(hidden) (WallRef as HiddenDoorScript ).Reveal() hidden = false else (WallRef as HiddenDoorScript ).Hide() hidden = true endif endEvent Modify the values to your liking. Edited September 27, 2012 by Sjogga Link to comment Share on other sites More sharing options...
JaydoDre Posted September 30, 2012 Author Share Posted September 30, 2012 Ooh that looks complicated and I'm glad I asked for help :)Thanks, will try out and revert. Link to comment Share on other sites More sharing options...
Recommended Posts