ID:177063
 
can someone give me an link to an overlay demo that does not include a verb. You just need to click on an obj to have it appear on a mob. Or if you can give me a code that will make that work. Thanks in advance.




~ Jermman
obj
overlays
Click()
usr.overlays += src
overlayone
icon = 'overlays.dmi'
icon_state = "one"
It is not stupid if it is going to help you learn.

Here is a simple code...
obj/clickmetoaddoverlay
layer=MOB_LAYER+1
icon='icon.dmi'
icon_state="clickmetoaddoverlay"
Click()
usr.overlays+=/obj/clickmetoaddoverlay
And if you want it in a HUD...

obj/clickmetoaddoverlay//define new object
layer=MOB_LAYER+1//define what layer the object will be on
icon='icon.dmi'//define the icon
icon_state="clickmetoaddoverlay"//define the icon_state
Click()//call the Click() proc
usr.overlays+=/obj/clickmetoaddoverlay//add an overlay called /obj/clickmetoaddoverlay
New(client/C)
screen_loc="1,1"//define where the object will be
C.screen+=src//add the src to the client's screen

client/New()//call client/New()
..()//do what ever else client/New() has in any other part of your code
new/obj/clickmetoaddoverlay(src)//A new obj/clickmetoaddoverlay in the src in which this case is the client
In response to DBZ Kidd
Thx Alot!

~ Jermman



DBZ Kidd wrote:
It is not stupid if it is going to help you learn.

Here is a simple code...
obj/clickmetoaddoverlay
layer=MOB_LAYER+1
icon='icon.dmi'
icon_state="clickmetoaddoverlay"
Click()
usr.overlays+=/obj/clickmetoaddoverlay
And if you want it in a HUD...

obj/clickmetoaddoverlay//define new object
layer=MOB_LAYER+1//define what layer the object will be on
icon='icon.dmi'//define the icon
icon_state="clickmetoaddoverlay"//define the icon_state
Click()//call the Click() proc
usr.overlays+=/obj/clickmetoaddoverlay//add an overlay called /obj/clickmetoaddoverlay
New(client/C)
screen_loc="1,1"//define where the object will be
C.screen+=src//add the src to the client's screen

client/New()//call client/New()
..()//do what ever else client/New() has in any other part of your code
new/obj/clickmetoaddoverlay(src)//A new obj/clickmetoaddoverlay in the src in which this case is the client
In response to Nadrew
Nadrew wrote:
obj
overlays
Click()
usr.overlays += src
overlayone
icon = 'overlays.dmi'
icon_state = "one"

Ah ah ah... he said no verbs, and Click() is a verb.

Lummox JR
In response to Lummox JR
Click() is not a verb, Click() is a proc. And I quote from the HelpOn menu in Dream Maker, "Click proc (atom)."
In response to DBZ Kidd
Yes, it's a proc, because verbs are a kind of proc. It's a ver, that's why you can macro it.
In response to Lummox JR
LOL! Good one.
In response to Garthor
Even so, I'm pretty sure that's exactly what he wanted.