ID:159394
 
obj 
overlayers
Chidori
icon='Chidori.dmi'
icon_state="gui"
Click()
usr.Chidori()


im havin trouble making this excute a verb that i have in my game(in this case a chidori verb). i want it when u click the image that it excutes the verb.
Verb pl0x?
mob/verb/Chidori()
if (usr.ingat)
return
if(usr.froze)
return
if(Chidorion)

return
else
var/damage = round(src.nin*5)
if(usr.PK == 0)
return
else
view(usr)<<'chidori.wma'
usr.ChidoriU += 1
usr.chakra -= damage
usr.ChidoriD = damage*1.4
usr.Chakragain()
usr.Chidorion = 1
usr.firing = 1
usr.overlays += 'Chidori.dmi'
usr.icon_state = "run"
RD
if(!usr.battlingRC)
ChidoriD -= rand(1000,2000)
if(usr.ChidoriD <= 1)
usr.ChidoriD = 0
usr.overlays -= 'Chidori.dmi'
usr.overlays -= 'Chidori.dmi'
usr.overlays -= 'Chidori.dmi'
usr.overlays -= 'Chidori.dmi'
usr.Chidorion = 0
usr.firing = 0
return
else
sleep(6)
goto RD


thats the verb
In response to Goggeeta
Have you even tried testing that out?
In response to Spunky_Girl
yea but it dosent actualy do the verb
In response to Goggeeta
Is it an actual image? As far as I know, you can't Click() an image >_>
In response to Goggeeta
Seems like it should work fine. Add some debug messages to the Click() and the verb; one of those if()s may be returning before anything actually happens. Or you may not actually be clicking on whatever the obj is.

Also, that first else in the Chidori verb is pointless. And if you only want it to be activated by clicking an object, I'd make it a proc instead of a verb.

EDIT: After a quick test; it seems you can't click objects which are in overlays. Assuming you're adding that to overlays (since its an obj/overlays/) that would be the problem.
In response to Spunky_Girl
i got it to work but now the overlays for the icon i set for it arnt showin up
In response to Falacy
There are no objects in overlays anyway; only static visual snapshots, or appearances. All overlays of an atom count as that atom's own icon and are treated the same as such, so when you click a mob's overlay you are really clicking that mob itself.