ID:162679
 
I want to do a hotbar, since I have no idea how to... im doing a Hud:
So here comes the problem: How to put a hud object and when i click it it activates the verb !?
mob/verb
Test()
set hidden=1 //dont want people to see it.
world << "This is a verb, getting called by a click."
Add_To_Screen()
client.screen+=new/obj/HUD // add it to the screen
obj
HUD
icon="whatever.dmi'
icon_state="whatevar"
screen_loc="5,5" // this puts it on the client screen at x5 y5, when its created.
Click() // if its clicked
..() // do normal..
usr.Test() // call the usrs test verb

I believe this is what youre asking for. If anything is incorrect feel free to correct me.
In response to DivineTraveller
how to call if it is another typesoft verb eg:
obj
mob/verb/blablah
Test()
set hidden=1 //dont want people to see it.
world << "This is a verb, getting called by a click."
Add_To_Screen()
client.screen+=new/obj/HUD // add it to the screen

In response to Cybork
That depends, can you show me some code on what you have? (if you have any?) Or can you tell me what kind of verb? (From the looks of it, its an obj/verb())
In response to DivineTraveller
mob/basic/
verb
Sushin_No_Jutsu(mob/M in oview(6))
set category = "Ninjutsu"
set desc = "Makes you appear in the oponnet's back."
usr.overlays += 'seals.dmi'
usr << "You begin to make the hand seals for Sushin No Jutsu"
sleep (30)
usr.overlays -= 'seals.dmi'
if (usr.chakra >=400 && usr.seals >=80)
flick ("smoke2",usr)
view ()<<"[usr.name]: SUSHIN NO JUTSU"
usr.chakra -=400
usr.loc = locate(M.x,M.y-1,M.z)
else
usr<<"You fail to use Sushin No Jutsu"

This is the verb i want to put in the Hud...

In response to Cybork
mob/verb
Add_To_Screen()
client.screen+=new/obj/HUD
obj/HUD
icon="jutsus.dmi'
icon_state="snj"
screen_loc="5,5"
Click()
..()
usr.Sushin_No_Jutsu(mob/M in oview(6)) // not sure if the args are needed, try it with and without
In response to DivineTraveller
thats not the problem.... the problem is that there is no
mob/verb/Sushin No Jutsu...
There is a
mob/basic/verb/Sushin No Jutsu
In response to Cybork
If they have the verb though, I dont think it makes a difference, although the player might have to be of /mob/basic to use it, I think that might be the issue. .. if they already are, Im not sure. *pokes audience*, any help?..
In response to DivineTraveller
Cmon guys... help here
In response to Cybork
Any way to put call a verb for eg: ( mob/basic/verb/Sushin(mob/M in world) )
In response to Cybork
I really need some help
In response to Cybork
1. I'm assuming this is what your topic in Code Problems is asking about also? Don't post the same topic in two forums.

2. Call verbs just like procs. If the proc/verb isn't in your mob's type, create a temporary mob of that type and call it off of that, like this:
obj/Click()
..()
var/mob/basic/b=usr
b.SpecialVerb()
mob/basic/verb/SpecialVerb()
src<<"Blarg!"

Actually, I've never tried that before. But I hear it works, you try it.