ID:141948
 
Code:


Problem description:

i created emotion verbs but they appear in command tab here is an example

mob/verb
smile() world << "[usr] grins."
giggle() world << "[usr] giggles."
cry() world << "[usr] cries their heart out."

how would i not only create a emotion tab but put these verbs in it and make like smiley face in a small chat box over the users icon
"how do i make" = Developer How-To

category setting(verb) is what you're looking for.
In response to Kaiochao
thanks 4 helping but i don't get it the section doesn't give me an example or a walk through on what 2 do I'm still confused I know how to make the verbs I just don't know on how to not just create a new tab (emotion) but also move my verbs to that tab
In response to Mel23jones
mob/verb
MyVerb()
set category="moo moo"
MyVerb2()
set category="moo moo"

You have to put set category="Tab Name" under each verb. If verbs have the same category setting, they will be shown in the same tab, or category.
In response to Kaiochao
this doesn't work look

mob/verb
smile() world << "[usr] grins."
set category="Emotion"

i get this
Charmed.dm:64:error:set :invalid proc definition
In response to Mel23jones
That's because you don't know how to properly program/didn't understand what he was doing. Typically you put what a verb does under it rather than by it's side.

mob/verb/stuff()
set category = "stuff"
stuff
In response to Jeff8500
not 2 b a burden but can u redo that using the grin emotion i had so i can just copy in and code it in
In response to Mel23jones
ive been trying 2 do wat u guys said and i came up with this

mob/verb/emotion()
set category = smile()
world << "[usr] grins."
set category = giggle()
world << "[usr] giggles."
set category = cry()
world << "[usr] cries their heart out."

but i get this
loading Charmed.dme
Charmed.dm:63:error:smile:undefined proc
Charmed.dm:65:error:giggle:undefined proc
Charmed.dm:67:error:cry:undefined proc
Charmed.dm:72:stuff :warning: unused label
Charmed.dm:63:error:= : bad text
Charmed.dm:65:= :warning: assignment of procedural properties takes place at compile-time. Move this to the top of the procedure to avoid this warning.
Charmed.dm:67:= :warning: assignment of procedural properties takes place at compile-time. Move this to the top of the procedure to avoid this warning.

Charmed.dmb - 4 errors, 3 warnings (double-click on an error to jump to it)
In response to Mel23jones
any idea of wat im suppose 2 do now?
In response to Mel23jones
Mel23jones wrote:
ive been trying 2 do wat u guys said and i came up with this

mob/verb/emotion()
set category = smile()
world << "[usr] grins."
set category = giggle()
world << "[usr] giggles."
set category = cry()
world << "[usr] cries their heart out."


If you are going to write the code that way this is how you would get a verb to show under a "Emotion" tab.

mob/verb/Smile()//put the verb here
set category = "Emotion"//then the category
world<<"[usr] grins"//then what the verb does


You should be able to figure out the other verbs from looking at that one.

[Edit]
To clarify things this is what i was referring to when i said "If you were going to write the code that way"
http://www.byond.com/developer/forum/?id=665332