This is a request. I would find it easier on me for one of the new and nifty features on my game.
Could there be something to check if a mob has used a verb?
I don't really know how it would be put in, but just a thought. :)
Here is an example of how I want it to work:
There is a mob randomly moving around
If another mob uses a specific verb when the first mob is around then something happens.
I know this could be coded into the game, but this feature would just be easier :)
-Sariat
ID:137335
Dec 16 2001, 6:12 am
|
|
Could there be something to check if a mob has used a verb? I think either one of these might be able to do what you're looking for: mob.verbs hascall() |
In response to Lesbian Assassin
|
|
Lesbian Assassin wrote:
Could there be something to check if a mob has used a verb? These will tell you if a verb exists, but not if it's been called. |
In response to Deadron
|
|
Of course, the fact that a verb has been called is pretty easy too.
mob var/tmp/verb_called = 0 verb/my_verb() verb_called = 1 New() ..() spawn(rand(1,10)) Loop() proc/Loop() for(var/mob/M in oview()) if(M.verb_called) usr << "Verb called!" M.verb_called = 0 spawn(10) Loop() |
If it is a verb that makes sense to attach to the other mob (the one who is sensitive to the use of the verb), then that is one way to do it. Otherwise, you'll have to create a "stimulus-response" system where use of the verb in question triggers a search for sensitive objects in the neighborhood and calls a "response" proc on the objects it finds. This is a little too case-specific to be done well as a built-in feature, though some have requested a short-hand notation for calling procedures of objects in view() to elliminate the for-loop. --Dan |
They can't possibly provide this as a feature -- you'll need to do it yourself. It's just a standard part of creating a game.