Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

Door script problem


DsoS
 Share

Recommended Posts

Lets see if I can make this understandable...

I have a script that turns lights on once the Player activates a item in my AR. This script works fine, but I'm having a problem with another script, that depends on having the lights turned on.

What I need is, when the player tries to activate a door before the lights are on and he/she tries to go through a door it will no allow it.

I have some of the script done, but having issues with one line, I'm not sure what to do with it.

My LightsOn Script:




scriptname MalamathLetThereBeLightScript


short light

float timer


Begin OnActivate Player


if ( light == 0 )

LightStoneReal.Enable

set timer to 3

set light to 1

endif


End


Begin GameMode


if ( light == 1 )

		if ( timer > 0 )

		set timer to timer - GetSecondsPassed

			else

				LightStoneReal.Disable

				LightStoneLeft.Enable

				LightStoneRight.Enable

				LightsOnMalamath.Enable

				set light to 2

		endif

endif


End


The Door Script:



Scriptname MalamathLigtsNeededDoorScript


Begin OnActivate Player


if ( LightStoneReal.IsDisabled ) <--------- What I'm having a issue with.....

MessageBox "I should turn around and see if I can figure out how to light this area up. It is far too dangerous to venture any further without more light."

return

else

Activate

endif


End


if ( LightStoneReal.IsDisabled )

Why am I getting the error, Unknown Variable or Function 'IsDisabled'

Link to comment
Share on other sites

Ok that worked.... but the effect is opposite It will allow you to go through with lights off, but will NOT allow you through with lights on :D

Wait, hold up, I forgot the == 1 thingy... back soon going to re-test it ;)

EDIT... even with the == 1 thingy, the effect is still opposite of what I need

Edited by DsoS_Allimir85
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...