ID:151962
Aug 4 2008, 8:00 pm
|
|
Im pretty sure that everyone either has a different method on giving mobs their verbs. You dont necessary have to give me any piece of code, but Im asking, if you can give me a method
|
In response to Lummox JR
|
|
I guess my post wasnt clear enough. Im sorry.
Anyway, to give the mob their verbs, do you guys save them in a list somehow, and then give them to the player? Or, do you guys have a proc where if certain requirements are met, the mob/player attains their verbs |
In response to Generation
|
|
I define verbs under the type that gets the certain verbs, and only verbs that they will always have access to are defined that way. For example, my /mob/Player object will always have the say verb, so I define say() under /mob/Player.
For special verbs, I like to create datums. Things for Administration and such will have their own specific types. Staff/verb typesof() takes care of handling those verbs really well. |
In response to CaptFalcon33035
|
|
CaptFalcon33035 wrote:
For example, my /mob/Player object will always have the say verb, so I define say() under /mob/Player. Psst. Define that under /client. =P Especially if it's a 'World Say'/'OOC' kinda verb. For special verbs, I like to create datums. Things for Administration and such will have their own specific types. Indeed. But if you don't need to group them, might as well define the verb as a global proc to be added to a verb list later; it doesn't need a dummy container. |
In response to Kaioken
|
|
Kaioken wrote:
Psst. Define that under /client. =P Especially if it's a 'World Say'/'OOC' kinda verb. That's what I had originally done, but I decided it'd be easier to maintain if I put those verbs under /mob/Player because I don't need clients trying to talk before they log in when there are special variables that I require access to. Indeed. But if you don't need to group them, might as well define the verb as a global proc to be added to a verb list later; it doesn't need a dummy container. That would work, but I like to keep a distinction between verbs and procs, where procs can only be accessed by verbs and internal calls and verbs only by the players. Besides, for potentially big lists of verbs that require sorting, containers are much easier and convenient to handle. You'll only catch me using gigantic lists for verbs when the host is able to edit text files that determine the verb classes and the verbs that go into each class, i.e. soft-coded classes. |
I'm really not sure what you mean by any of that. I assume you're asking for help on something more complex than merely writing verbs, but I can't tell what you're actually trying to accomplish.
Lummox JR