obj/HUD
icon = 'hud.dmi'
View
icon_state = "view"
screen_loc = "1,6"
name = "View"
Click()
usr<<'ListClick.wav'
look()
Then, heres the proc.
proc/look()
for(var/mob/M in world)
src<<"[M]'s Profile"
ID:170043
Mar 28 2005, 6:12 am
|
|
Well, I am trying to make a proc that will allow me to view the mobs stats. I try to do that but when I click it noithing happens.
obj/HUD Then, heres the proc. proc/look() |
You never told look() who to send its output to, but src is wrong because it's the HUD object. usr is wrong too because this is a proc and even though you can be sure of what usr is at this point, you're better off not making that assumption if you ever use the proc for anything else. Make look() a mob proc, with src being the mob looking and also the mob being looked at. (If you need to look at another mob, send an argument which tells look() who's looking, and let src be the looked-at target.)
mob/proc/look() Lummox JR |
usr<<'ListClick.wav'
That's wrong, and most likely messing with your Click() proc. Use the sound() proc to send a sound to th player. You'll probably also want to call the parent proc of Click(): ..(). Some might see it as unecessary, but I like to include it whenever I over-ride Click() or DblClick().
~X