ID:169534
 
Basicaly.. i've got 2 tile tall NPC's in my game that i'm working on.
code:
obj
npchead
name = "Head"
icon = 'npc.dmi'
icon_state = "head"
layer = MOB_LAYER+10
Click()
/obj/npcbody/Click()
npcbody
icon = 'npc.dmi'
icon_state = "body"
name = "Body"
layer = MOB_LAYER+10
Click()
//code

Now how do i make it so that when the top half of the npc is clicked... the code that is linked to the bottom half of the 2 tile npc is started?

I tried the above "Click()... /obj/npcbody/click()" but that produces a warning..

"NPC.dm:8:/obj/npcbody/Click:warning: use call() to call a proc by reference"

I've used call but still recieve this warning??

When played.. it does work.. however its this warning that is bugging me, how can i rework it to get rid of this warning?

Thanks.
You could always just use a proc. Which in the long run would make more sense...

obj
npchead
name = "Head"
icon = 'npc.dmi'
icon_state = "head"
layer = MOB_LAYER+10
Click()
Proc1()
npcbody
icon = 'npc.dmi'
icon_state = "body"
name = "Body"
layer = MOB_LAYER+10
Click()
Proc1()

mob/proc
Proc1()
//code


-Ryan
In response to Ryne Rekab
*slaps forehead*

hehe thanks mate.. never thought of that! cheers.