ID:170862
 
I have a few problems that i need help wik....

1.
My player is invisible. Here's the code...

mob/player
icon = 'playermodels.dmi'
icon_state = "Dragoon"

mob/Player
Login()
if(fexists("players/[src.key].sav"))//If the player has a save it loads it
src.LoadGuild()
src.loc = locate(1,1,1)
sleep(0)
spawn(0)
..()
Logout()
src.SaveGuild()//When the player logs out it saves the guild he's in
..()

2.
how would i go about making "sight" in a game? I would check the demos and libs but BYOND Central seems to be down. Basically i want to NOT be able to see through objects that have density = 1.

3.
A way to do light. I need help to find out how to make an object make light in an area around it, and the rest of the world to be in shadows (in houses i mean).

Thanks in advance for any help...
oops....sry, dont know how to close dm tags...
In response to Pakbaum
Pakbaum wrote:
oops....sry, dont know how to close dm tags...

 INSERT CODE HERE




Like that, with
 </DM>
In response to Lenox
thx, can u answer any of my problems?
Whether you can see through an object or not is determined by its opacity variable. If opacity is 1, you can't see through, if it's 0, you can.

Basic visible/notvisible lighting is easy to do in BYOND.

By default, all BYOND's areas are lit up. The first thing is to put this code in your project, so that they aren't:
area
luminosity = 0 //Set it so that the default area is not lit up

If you only want specific areas to be dark by default, you can create a subtype of area and place it on the map where you want darkness. Ex:
area
bright
luminosity = 1
dark
luminosity = 0


Next, is to determine how far a player can see in the dark without needing light. That's controlled by the mob's see_in_dark variable. A 1 makes it so the player can see themselves and what they're on, a 2 so they can see squares 1 away from them, and so on.

Lastly is objects that cast light. All atoms have a luminosity variable, which is how far they will project light. A torch might look something like this:
obj
torch
luminosity = 3