ID:172804
Mar 25 2004, 9:16 am
|
|
Is it possible to change the name of a verb at runtime? If so, could someone enlighten me as to how?
|
Mar 25 2004, 10:56 am
|
|
Nope.
|
In response to Garthor
|
|
Sure there is...
mob/verb/Myverb() You still use the normal path while coding however: src.verbs+=mob/verb/Myverb() |
In response to Nick231
|
|
Except that's not at runtime.
|
In response to Foomer
|
|
Wouldn't it be at runtime if a verb pointed to the MyVerb() proc?
|
In response to Foomer
|
|
True... thinking backwards. Will still pretty much do what he wants it to do, just compile-time rather than runtime.
|
In response to Phanes04
|
|
No.
|
In response to Nick231
|
|
Nick231 wrote:
True... thinking backwards. Will still pretty much do what he wants it to do, just compile-time rather than runtime. No, it would not do what he wants and for the reason you stated (it's done at compile time). I wondered this same thing about verbs myself when I started out, and I thought it unfortunate that I could not change their names. Being able to change a verb's name would be useful since I could do something like this: mob/verb Sure, for that example I could just call the attack verb "Attack Target", but there are times at which I had wished I could do something like that example. You could go with objects in a statpanel and use their Click() and have it work similar to a verb, but it would be nice if you could do it to a real verb. |
In response to Loduwijk
|
|
There currently is a system in place for renaming verbs dynamically, but it doesn't work. It'll be fixed for an upcoming version.
It looks like this: mob/verb/old_verb() |