ID:151103
 
how (if possible) do I call procs on obj's in another obj's contents?

I have to be able to call those procs from other procs.
how (if possible) do I call procs on obj's in another obj's contents?

Once you have a pointer to the obj, it's easy. For example:

verb/fireball(mob/M as mob in view(usr, 5))
M.FireDamage()
for(obj/O in M.contents)
if(istype(O)) O.FireDamage()

In response to Gughunter
On 4/22/01 2:54 pm Gughunter wrote:
how (if possible) do I call procs on obj's in another obj's contents?

Once you have a pointer to the obj, it's easy. For example:

verb/fireball(mob/M as mob in view(usr, 5))
M.FireDamage()
for(obj/O in M.contents)
if(istype(O)) O.FireDamage()

verb/fireball(mob/M as mob in view(usr, 5))
M.FireDamage()
for(var/obj/O in M.contents)
if(istype(O)) O.FireDamage()

Gug, you make too many tiny mistakes. ;-)
In response to Spuzzum
Gug, you make too many tiny mistakes. ;-)

Doh! How true... but then I haven't really done any actual coding in DM for about three weeks! Just planning and stuff... how quickly the details slip away...
In response to Gughunter
On 4/23/01 1:03 pm Gughunter wrote:
Gug, you make too many tiny mistakes. ;-)

Doh! How true... but then I haven't really done any actual coding in DM for about three weeks! Just planning and stuff... how quickly the details slip away...

Guy is seeing another gaming system. I just know it.
In response to Deadron
On 4/23/01 1:23 pm Deadron wrote:

Guy is seeing another gaming system. I just know it.

LOL!

I thought that his "phone line going down" last week seemed awfully suspicious. This is 2001, for crying out loud. Phone lines don't just magically stop working!

I blame Z.

In response to Tom
On 4/23/01 1:31 pm Tom wrote:
On 4/23/01 1:23 pm Deadron wrote:

Guy is seeing another gaming system. I just know it.

LOL!

I thought that his "phone line going down" last week seemed awfully suspicious. This is 2001, for crying out loud. Phone lines don't just magically stop working!

I blame Z.

Guy also has "late nights at the office", and we all know what that means.