I have a day/night script. I want to make it so its light when you go in buildings, and I want another script so where its night, lanterns outside light, but when its morning, the lights from the lanterns go away… how would I do this?
Maybe you could add a flag when it’s night time and when the flag is true you could set the light however you want in each level. But that’s probably one of if not the hardest way to do this… I’ve just never done it and it’s how I would figure it out the first time. It might actually take two flags to work successfully the way I mentioned… one to determine when it’s night time and one to cause the day/night script to be ignored when you are inside any “interior levels” so you can set your lighting appropriately with an additional npc inside and outside of the level(s) in question. Or perhaps you could setup an array within your code to ignore the time of day when in any level within the array and just be bright like normal.Play around and see what you come up with that will work for what you need done. By the way, I would recommend setting a flag for when it’s night time pretty much no matter what, though if someone else recommends otherwise they are probably correct… anyway, the reason being that you want your lanterns and torches or whatever etc to turn off at morning, and this is the easiest method I know of for creating that effect. Basically just display a different image (the light not on) when you want it off, and hide the light emitting npc as well whenever your flag is not true. Or do it the other way around, telling when it’s daytime and turning them on and off accordingly with that flag instead, whichever is easier for you. But like I said, anything conflicting with my advice is probably better as I’ve not scripted many things quite that complex, and never dealt with a day/night system… yet. Just wanted to try to help give you some ideas.
Crossfire, experiment with scripting. You blindly use scripts for your server which takes away part of the fun. I may not be able to script amazing like Downsider, Tricxta, or any other good scriptors out there, but I’m able to understand scripts when I use them and I can manipulate them. I played with the offline editor for two months in scripting, leveling, and with graphics before starting a server.