Okay so I was considering adding a day and night system to my game, and had the idea of modifying the RGB values to make them nighttime-ish.
So I ran a loop that checked every area, turf, object and non-player mob in the world and darkened them. Worked like a charm.
BUT
Everywhere that there is more than one turf in the single square does not change color at all, it's obviously being skipped and I don't know how to change it(for example, a sandy turf partially covered by a bench will darken the bench but not the sand).
So my question is this... how do I access those turfs? I've tried checking the contents of the areas and other turfs, but they aren't in there.
ID:270740
Aug 16 2006, 5:35 pm
|
|
Aug 16 2006, 5:56 pm
|
|
When you overlap turfs it takes one turf and adds it to the others overylays...or something like that. Anyway, changing the rgb value of everything in the world will seriously bog you down when you have a large map.
|
In response to SuperAntx
|
|
Ah, well if it's in the overlays/underlays then I can hopefully get to it now... thanks.
And it's gonna bog me down anyway to switch from night to day all at once, but this seems the fastest way to do it without getting overly complicated... |
In response to Perpetr8r the Perpetu8r
|
|
When you modify the rgb value of everything you may end up getting weird results.
eg: Adding 30red to 240red 240+30=270 Since it only goes to 255 you'll end up with a darker color when you switch back to night. 255-30=225 You should check out OutsideArea. It may not be as nice-looking as changing the rgb values in real-time but it's much more efficient. Besides, if the day/night bit doesn't play a major role in your game it's just superficial eye candy anyway. |
In response to SuperAntx
|
|
SuperAntx wrote:
When you modify the rgb value of everything you may end up getting weird results. Ok, I will check it out. As for changing RGB, I already took care of that by initialising the icons for day, so the RGB only goes one way. It seems though that I can't get to my turfs -_- so I'll just hope that this library does the trick, or at least gives me the idea on how to make it work. And yeah, it IS just superficial eye-candy, but I'd like to be able to implement it anyway... |