ID:157573
Feb 11 2010, 1:16 pm
|
|
How would I go about making a verb that, when used, adds buffs or debuffs to mobs in the Area of Effect?
|
Feb 11 2010, 1:19 pm
|
|
In response to Garthor
|
|
So I would put the code in a verb, change some_list to oview(5) or so, and apply_buff to my code for the buff or debuff?
|
In response to Tman1114
|
|
Yeah, pretty much.
|
In response to Garthor
|
|
Garthor wrote:
for(var/mob/M in some_list_representing_the_area_maybe_oview()) Although a good code, if what he is doing needs him to only give the buff to say, a teamate, you would go with something along these lines: mob/var/team/list() Sorry if you already knew that, just wanted to point it out for you in case. |
In response to Albro1
|
|
And good code would not be directly modifying some variable but would be taking an object-oriented approach to maintaining buffs and debuffs.
|
In response to Garthor
|
|
Well, yes, but you see what I am getting at with that.
|
Use this:
mob/verb/buff() |
In response to Twinsen99
|
|
Twinsen99 wrote:
Use this: Yeah no, don't use that. |
In response to Twinsen99
|
|
Ever heard of view()? What you posted is just stupid. Specially since block() returns a list of turfs, not mobs.
|
In response to Ruben7
|
|
Everybody is talking about the view (), and I gave an alternative ... but you already came stressed, messing me...
[Edit] Try using this: mob/verb/buff() Only change the code off buff, and the locate of block... |
In response to Twinsen99
|
|
Twinsen99 wrote:
Try using this: No, don't. That code is horrible. Just stop trying to approximate help with your Bizarro-world outlook on programming. |
In response to Albro1
|
|
Albro1 wrote:
Garthor wrote: for(var/mob/M in some_list_representing_the_area_maybe_oview()) Although a good code, if what he is doing needs him to only give the buff to say, a teamate, you would go with something along these lines: mob/var/team/list() Sorry if you already knew that, just wanted to point it out for you in case. Thanks, that was what I was looking for anyway, even though I didn't say. |
In response to Popisfizzy
|
|
NOGROSS,PLEASE
|
In response to Twinsen99
|
|
In what world does that make any sense other than your own?
|