Jump to content

script problem


Spudscorner

Recommended Posts

2. How do I make it so the doors will not open when manually clicked on? I just want the activator to open them.

 

I would use either a quest variable or a global variable. In the activator script, set the variable to 1 when activated. Then create an OnActivate script for the doors which test for that var. If it is 1, then "Activate" and reset the var. Otherwise do nothing or display a message or whatever.

 

You might look at the scripts for the various lever-activated doors in the game. If I remember tonight, I'll modify the test mod I posted for you and re-upload it.

 

Mez

Link to comment
Share on other sites

As Mezlo suggested, you could look at the scripts on the lever-activated doors in the game. Copy it to your door and make sure everything is set up as it should with a lever (So that the switch and door are linked).

 

And stopping the player from activating the door himself can be done very easily, by adding these lines to the script on the door:

begin OnActivate Player
return
end

If there has to be any journal entry or whatever you'll have to type it above the return line.

Link to comment
Share on other sites

name='mezlo' post='270024' date='Jun 13 2007, 06:24 AM']I would use either a quest variable or a global variable. In the activator script, set the variable to 1 when activated. Then create an OnActivate script for the doors which test for that var. If it is 1, then "Activate" and reset the var. Otherwise do nothing or display a message or whatever.

 

You might look at the scripts for the various lever-activated doors in the game. If I remember tonight, I'll modify the test mod I posted for you and re-upload it.

 

Mez

 

Mez you rock my world. That would be awesome if you could do that.

 

And stopping the player from activating the door himself can be done very easily, by adding these lines to the script on the door:

CODE

begin OnActivate Player

return

end

 

Povuholo, sorry I got your name wrong and thanks for your help.

 

Cheers

Link to comment
Share on other sites

OK, when I used the code Povuholo posted, the pot would not open the doors because the Player was still the action ref. So, I had to go back to my original idea of using a quest/global variable. Here is the door script I got to work:

 

Begin OnActivate Player
If aaaDoorActivation == 1
	Set aaaDoorActivation to 2
	Activate
	Return
ElseIf aaaDoorActivation == 2
	Set aaaDoorActivation to 0
	Activate
	Return
Else
	Message "This door is opened remotely."
	Return
EndIf
End

 

If I set aaaDoorActivation to 0 in the first pass, only 1 door would open. By setting it to 2 and then to 0, both doors opened.

 

Mez

 

PS - I uploaded the updated test mod, Spud.

Link to comment
Share on other sites

OK, when I used the code Povuholo posted, the pot would not open the doors because the Player was still the action ref. So, I had to go back to my original idea of using a quest/global variable. Here is the door script I got to work:

 

Begin OnActivate Player
If aaaDoorActivation == 1
	Set aaaDoorActivation to 2
	Activate
	Return
ElseIf aaaDoorActivation == 2
	Set aaaDoorActivation to 0
	Activate
	Return
Else
	Message "This door is opened remotely."
	Return
EndIf
End

 

If I set aaaDoorActivation to 0 in the first pass, only 1 door would open. By setting it to 2 and then to 0, both doors opened.

 

Mez

 

PS - I uploaded the updated test mod, Spud.

 

ok wow. my first question is this. Is aaaDoorActivation the door name? I checked the file you uploaded and it works exactly the way its supposed to but when I try it on my doors it doesn't do anything. Could you explain this a little more for me please. I do appreciate this.

 

Cheers

Spuds

 

 

 

OK I get it, and I have it working. It was the global that I didn't understand but I get it and I have this working.

 

Thanks you everyone for you help especially Mezlo

Link to comment
Share on other sites

ok wow. my first question is this. Is aaaDoorActivation the door name? I checked the file you uploaded and it works exactly the way its supposed to but when I try it on my doors it doesn't do anything. Could you explain this a little more for me please. I do appreciate this.

 

Sorry about that. I probably should have used aaaDoorActivationVar instead. ;)

 

Mez

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...