custom door opening script

Post » Tue Dec 29, 2009 8:53 am

hi i am in a bit of a pickle
i wish to create a script for this:
http://i353.photobucket.com/albums/r375/xemnes1/p.jpg

there are 2 stones (initialy disabled when you enter) in the red circles
and a door in the yellow circle
i wish there to be 2 items (stones tht resembe the disabled ones on the pedestals) that when placed (used) on both pedestals the disabled stones get activated to seem like they are placed and when both have been placed, the door at the end is activated and opens

i have no idea how to script and i wish to create this so i would like a bit of help with this

thx!
User avatar
Cash n Class
 
Posts: 3430
Joined: Wed Jun 28, 2006 10:01 am

Post » Tue Dec 29, 2009 6:43 am

can no one help me?? its been a day now and no one has replied =(
User avatar
Courtney Foren
 
Posts: 3418
Joined: Sun Mar 11, 2007 6:49 am

Post » Tue Dec 29, 2009 2:56 am

hi i am in a bit of a pickle
i wish to create a script for this:
http://i353.photobucket.com/albums/r375/xemnes1/p.jpg

there are 2 stones (initialy disabled when you enter) in the red circles
and a door in the yellow circle
i wish there to be 2 items (stones tht resembe the disabled ones on the pedestals) that when placed (used) on both pedestals the disabled stones get activated to seem like they are placed and when both have been placed, the door at the end is activated and opens

i have no idea how to script and i wish to create this so i would like a bit of help with this

thx!

Judging from the pic, the stones rest on top of pedestals (it looks like ARPedestal01). One thing you can do is make two new Activators out of the ARPedestal01.NIF (one for each stone). Then give the "Initially Diasbled" stones unique RefIDs (I'll use Stone01Ref and Stone02Ref from here on). Make sure the "Persistent Reference" flag is checked (I've gotten a lot of headaches by forgetting to do this). Now make an item using the same model as the stones (I'll call it SoneItem from here on). Now make the door a Persistent Reference and give it a unique RefID (I'll use StoneDoorRef from here on). Note: the door in the pic appears to be ARStoneGate02, which won't normally open since it doesn't have a script attached to it. You'll need to attach ARGate01SCRIPT to it in order to use it (if you haven't already). With all this in place, it's time to write the scripts for the two activators. They should look something like this:

scn Script01NameHereBegin OnActivate Player If player.getitemcount StoneItem >= 1   Player.removeitem StoneItem 1   StoneRef01.enable Endif If StoneRef02.GetDisabled == 0 ; if the other stone has already been placed   StoneDoorRef.Activate  EndifEnd


And the script for the second activator will look much the same:

scn Script02NameHereBegin OnActivate Player If player.getitemcount StoneItem >= 1   Player.removeitem StoneItem 1   StoneRef02.enable Endif If StoneRef01.GetDisabled == 0 ; if the other stone has already been placed   StoneDoorRef.Activate EndifEnd


The way these are set up, no matter which stone you "place" first, placing the second should activate the door. Hope this helps :D
User avatar
Jason White
 
Posts: 3531
Joined: Fri Jul 27, 2007 12:54 pm

Post » Mon Dec 28, 2009 9:03 pm

yay its works, thx,
User avatar
CORY
 
Posts: 3335
Joined: Sat Oct 13, 2007 9:54 pm

Post » Mon Dec 28, 2009 8:52 pm

yay its works, thx,

Your welcome! :D Glad I was able to help.
User avatar
Victor Oropeza
 
Posts: 3362
Joined: Sun Aug 12, 2007 4:23 pm


Return to IV - Oblivion