mob
verb
Arena(mob/M in world)
Problem description: I'm trying to find a replacement for mob/M in world so that I can have it only show the clients currently on the server. I can't use client because it won't recognize the mob vars. Any ideas?
Code:
mob Problem description: I'm trying to find a replacement for mob/M in world so that I can have it only show the clients currently on the server. I can't use client because it won't recognize the mob vars. Any ideas? |
of course, you don't even need var/mob/M as long as you're ok with using C.mob. For instance, if your mobs have a variable called hp....
C.mob.hp = C.mob.max_hp |
Koshigia is right, you can do something like this:
mob |
Your first method automatically invited every mob in the server to the arena, I don't know if I improperly wrote it, or what.
|
In response to Ssj4justdale
|
|
Ssj4justdale wrote:
Koshigia is right, you can do something like this: > mob Just tried this. Literally everything was on the list, including turfs and objects. |
In response to Micdogmic
|
|
Micdogmic wrote:
Ssj4justdale wrote: > > mob Just tried this. Literally everything was on the list, including turfs and objects. Hmm? well then just use Koshigia's "player list" method, it definitely will get the job done. |
In response to Micdogmic
|
|
Hold on, I'm gonna test that first method out myself. You mind copying and pasting your implementation?
|
In response to Koshigia
|
|
Koshigia wrote:
Hold on, I'm gonna test that first method out myself. You mind copying and pasting your implementation? var/list/players = new This is what I'm currently using, I don't have your first method anymore. Sorry. |
In response to Micdogmic
|
|
So, finding a client in world is not as straightforward as finding lets say a mob.
This will not work, verb/test(client/c in world) Provided you have a players list populated with clients, this will verb/test(client/c in players) I guess it's just that clients are not automatically added to world so you gotta find another way of addressing them. |
In response to Micdogmic
|
|
Well, at any rate... in my opinion the second method would have been the preferred method, anyhow. I should've made that clear from the get go xD
|
client can't be used by the standard "in world" as clients aren't in world.
To use a list of clients (that isn't predefined) you would want to generate it on the fly instead by using for(var/client/c), which cycles though connected clients. You may then use this custom proc as the list that you're offering for the verb to select from. To go further, you can add them mobs instead, providing the op with the functionality that he wants. world |
or, if you are already keeping track of a list of clients elsewhere...