Yes another BUMP() question from me.
Is it possible for an obj created by a mob to take the mobs value(I don't know if I stated it correctly :( ) ...for example:
mob/Chicken
verb()
new obj//I forgot how make an obj, just pretend I did it and its in src.loc
walk(the obj, in src.dir)
Obj
Bla_Bla
BUMP()
mob that made it health += 5
Ok, so if anybody understands what I need and knows how to help me, please do.
Thank you for your time.
ID:175262
May 17 2003, 6:32 am
|
|
May 18 2003, 11:03 am
|
|
*Bump* I think it's legal, considering a day passed and its on the 4th page =(
|
In response to SSChicken
|
|
I dont understand what your having a prob with this.
mob/verb/Chicken() var/NC = new /obj/Chiken(loc=locate(usr)) NC:owner = usr.key NC: add the rest of the stats walk(NC,usr.dir) obj/Chicken Bump(atom/a) if(parent_type == /turf) del src else do what ya want and remember since you made the owner var you can use for(var/mob/M in world) if(M.key == src.owner) continue with what your doing |
SSChicken wrote:
Yes another BUMP() question from me. I think you mean "Is it possible for object1 to modify object2's (object2 was created by a verb belonging to object1) variables?". The answer would be yes. Give obj/bla_bla a variable to keep track of the mob/chicken that created it: mob/Chickenvar/obj/Bla_Bla/moving_bla moving_bla = new obj//I forgot how make an obj, just pretend I did it and its in src.locmoving_bla.owner=src walk(the obj, in src.dir)var/mob/Chicken/owner BUMP() |
In response to Hendrix
|
|
Hendrix wrote:
I dont understand what your having a prob with this. You should whenever possible try to avoid using ":", its better in this case to do something like mob/verb/chicken() |