ID:144517
 
Code:


Problem description:

Im using night/day system in my game, and im trying to make it so if u like, got a certain item equipped the night effect doesnt affect you for 4 squares <.<
world
area = /area/outside

New()
..()
for(var/area/outside/O in world)
spawn() O.daycycle()


area
outside
icon = 'Night.dmi'
layer = 999
var
lit = 1


proc
daycycle()
lit = 1 - lit
if(lit)
icon_state = "dark"
night = 1
else
icon_state = ""
night = 0
spawn(150) daycycle()


inside
luminosity = 1

is there any way that if i equip a candle or something the area icon state changes from "dark" to normal in the 4 squares around you and when you move the area icon state of those 4 squares follows you or something?

thats the best way i can explain it lol >.<
You want to read about the luminosity variable. which was stated in that copy of Shadowdarke's demo >_>

- GhostAnime
In response to GhostAnime
i forgot to mention that i didnt want to use luminosity cause its all black <.<i want to use a slightly dark overlay so u can still see trough it, just not as good.
<br/> i did try this demo:
http://developer.byond.com/hub/Shadowdarke/ sd_DynamicAreaLighting_Demo

thats kinda what im looking for.
In response to Ruben7
I know what you are talking about. In the reference of the luminosity variable (hence the link), it states that if you increase the variable amount (excluding for area), that's how much brither it will get. Eg:
mob
luminosity=1 //can see 1 square away

obj/Candle
verb/Light()
usr.luminosity+=3 //adds 3 to the usr's lum. var, making the usr see 4 squares away
Note in the example I didn't have any safety checks (like if the candle was already lighted) as I wanted to show you what you wanted.

- GhostAnime
In response to GhostAnime
is there any way i can change the luminosity icon lol >.>
its too dark any way i can make it like polkadots?
In response to Ruben7
Um, I forgot how >_< See if Shadowdarke's One Way View Demo can help, I think it was an image or something with the FLY_LAYER....

- GhostAnime
In response to GhostAnime
nope, thanks anyways
In response to Ruben7
No problem, hope ya get your answer >_>

- GhostAnime
In response to GhostAnime
btw do you know how to hyperlink words? like when you click it it takes you to the certain link >.>
In response to Ruben7
HTML Hyperlinks

to sum it up:<a href="url">Text to be displayed</a> (though I don't use the quotes >_>

- GhostAnime
In response to GhostAnime
test
cool thx
In response to Ruben7
You know that he knows, you've seen him do it twice..
Learn HTML, it's easy!
Click here
In response to Xion171
You beat me to it :(
In response to Xion171
O.O
In response to Ruben7
help meh >.<
In response to Ruben7
i guess no1 can answear my question? >.<