hey everyone... I just wanted to know if it's possible to create a verb which creates another verb?
The idea is that on game I would be able to give someone a verb which I'd choose its name, but its function would be basically always the same. For example...
mob/verb/Give_Spell()
...
src << You gave [usr] the spell [verbname]!
...
Verb on use:
view() << "[usr] used [spell]"
That would do it. Sorry for bad english, I'd appreciate any help or comment... thanks!
Well, the best way I see to go about this is using special verb datums. This is the basic idea:
_verb Let us know if you have any questions. :) |
Thanks a lot for the help. I'd still like to know if there's a way to add a "mana cost" var to the verb, so that one would give the verb to somebody (or even everybody in his view()), and at the same time pick how much mana it would cost.
|
As far as I'm aware, verbs cannot have their own variables so you wouldn't be able to assign a var to one of your given verbs.
Two options come to mind, though I'm sure there are other answers outside of these ideas. 1.) Assign a variable to each mob that would be paired with the verb that you are giving out. The verb could then check the mob's variable and act accordingly. 2.) Instead of giving the mobs new verbs, give them an obj that has the verb you want to give them. That way, the obj can hold as many variables as you need it to, and the player will still have the verb in their verb list and will be able to macro it. The only issue is that I'm not sure if you could then rename the verb that would be on the obj that you would give them. |
Dipic wrote:
As far as I'm aware, verbs cannot have their own variables so you wouldn't be able to assign a var to one of your given verbs. I really liked your second idea, it looks a lot easier than what I was thinking of... I could give 'em a kind of book instead that would keep the variables indefinitely. Thanks a lot for the help... |
Or something around those lines death the forums for verbs+= also this should be in Developer Help :)