Jump to content

Stupid scripts...


TodaY

Recommended Posts

Hi everybody ;D

I'm working on a house mod, and I want to make a light button (is really needed since daylight actually goes on and off during the correct times... when it's on and the lights are on there's too much lighting, but when it's off and the lights are off there isn't enough lighting ;|)

So what I did was give the flame of a candle and a "light bulb" a reference ID, and set them as persistent reference.

But when I try to make this script:

----------------------------------

short stage

 

Begin OnActivate

if stage == 0

(refID the flame).disable ; could be the other way around

(refID the lightbulb).disable

set stage to 1

elseif stage == 1

(refID's).enable

set stage to 0

endif

end

----------------------------------

It tells me it can't find the objects defined in the reference ID ;/

I'm very confused here - I know something about scripting, but not much

I guess this has something to do with parents and stuff...

Any help on how to make this work is very apreciated! Thanks for reading and happy modding ;D

Link to comment
Share on other sites

Hi everybody ;D

I'm working on a house mod, and I want to make a light button (is really needed since daylight actually goes on and off during the correct times... when it's on and the lights are on there's too much lighting, but when it's off and the lights are off there isn't enough lighting ;|)

So what I did was give the flame of a candle and a "light bulb" a reference ID, and set them as persistent reference.

But when I try to make this script:

----------------------------------

short stage

 

Begin OnActivate

if stage == 0

(refID the flame).disable ; could be the other way around

(refID the lightbulb).disable

set stage to 1

elseif stage == 1

(refID's).enable

set stage to 0

endif

end

----------------------------------

It tells me it can't find the objects defined in the reference ID ;/

I'm very confused here - I know something about scripting, but not much

I guess this has something to do with parents and stuff...

Any help on how to make this work is very apreciated! Thanks for reading and happy modding ;D

 

double click on the object's name in the Cell View Window. So, find ur cell, find the object's name in the list of items contained in that cell, double click on it(or right-click properties) and give it a Reference EditorID.

 

go here and scroll down to "Creating a New Persistent Reference". That id is the one you need to use in your scripts.

 

that should work. also, i haven't coded in a while, but the script looks a bit weird. So, the next problem could be the script itself. just post if there are more problems.

Link to comment
Share on other sites

I already have done everything you just said - and it's there in that script ;p

but david basher helped me - all the script needed was a timer

Link to comment
Share on other sites

  • Recently Browsing   0 members

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