ID:143824
 
Code:OverLay
var/const
TRAPDOOR_LAYER = FLOAT_LAYER-1


turf/Spell
a
icon = 'RedSpellSign.dmi'
icon_state="a"
b
icon='RedSpellSign.dmi'
icon_state="b"
c
icon='RedSpellSign.dmi'
icon_state="c"
d
icon='RedSpellSign.dmi'
icon_state="d"


turf/Build
BuildRt
icon='BuildUpRed.dmi'
icon_state="a"
BuildRb
icon='BuildUpRed.dmi'
icon_state="b"


turf/MapStuff
Grass
icon='Turf.dmi'
icon_state="Grass"
Wall
icon='Turf.dmi'
icon_state="Wall"
density=1
TrapDoor
icon='Turf.dmi'
icon_state="Wall"
density=0
layer = TRAPDOOR_LAYER



turf/start
start
icon='start.dmi'


mob
icon='Maleb.dmi'
Login()
loc = locate(/turf/start)


This time i'm trying to get the "trapdoor" to appear above the player/mob. This isn't working o.O and i won't want to make the overlay a verb

usr.overlays.Add(imagename)
In response to Xx Dark Wizard xX
Sorry, But where would i add that?
In response to Bluebook
on the add overlay verb
In response to Xx Dark Wizard xX
Code\turf.dm:20:error:usr :invalid proc definition


Its saying its a invalid proc


turf/verb/usr.overlays.Add(imagename)
var/state = input("What icon_state?","Icon_State") in icon_states(I)
var/image/I1 = image(icon=I,icon_state=state)
overlays += I1
I will tell you exactly what this code does:

-The turfs come up with their icons, exactly as you defined them
-In AddOverlay, the turfs get an overlay, changing their on-screen picture to their pic with an overlay of a custom icon chosen by the player
-And when the mob logs in, he gets his pic and goes to start.

If you want the overlay to go on the player, however, change it to this:

turf/verb/AddOverlay(I as icon)
var/state = input("What icon_state?","Icon_State") in icon_states(I)
var/image/I1 = image(icon=I,icon_state=state)
usr.overlays += I1 //this will overlay the usrs icon with a custom icon from their computer


If you want the icon to be predefined, change it to this:

turf/verb/AddOverlay(I as src.icon)
var/state = input("What icon_state?","Icon_State") in icon_states(I)
var/image/I1 = image(icon=I,icon_state=state)
usr.overlays += I1 //overlays the usr's icon with a pre-defined one of the turf


But all this will do is allow the player to change his icon to a turfs. Be more exact as to what you want to do. AND DON'T COPY AND PASTE
In response to Bluebook
And that's why I gave you the exact code on how to fix it. What do you exactly want to do with the code?
In response to Armiris
Oh.. I got it. Thanks You