ID:174764
 
How would you go about calling a verb from an object? Something such as...
obj
Challenge
layer=MOB_LAYER+56
icon='hudicons.dmi'
icon_state="challenge"
New(client/C) screen_loc = "15,6",
C.screen+=src
Click()
//then what..?



-Camaro-
Verbs only belong to players. Unless a player happens to be an obj, you either A. can't, or B. shouldn't.
In response to Jon88
Well, how would you go about clicking an object, and make it perform a verb? No, that's not the same question as my first post;). I mean can I make it a proc? How does it get setup? it's a Challenge verb, so it has to do with mobs in the world.

-Camaro-

ps: if this is even possible =P
In response to Camaro
Here's an example sort of related to your problem:

mob
monster
Click()
//usr is of type /mob so type cast!
var/mob/player/P = usr
P.attack(src)

player
proc/attack(mob/monster/M)
//Blah blah, attacking stuff
//src is the player attacking!


When someone clicks on a monster, it'll run the player's attack proc. Verbs and procs operate identically(for the most part), so calling them would be similar. Don't forget that usr is of type /mob so you'll need to type cast to the type of your players so you have access to the methods you'd like to call.
In response to Camaro
Basiclly do whatever you would want the verb to do.