<dm>I have a problem with adding and removing overlays. I have a parent object type with several child types. The parent has the basic functionality:
parent_type = /obj
layer = p_layer
usr.overlays += src
verbs -= /test_verbs/Add_Overlay
verbs += /test_verbs/Remove_Overlay
usr.overlays -= src
verbs += /test_verbs/Add_Overlay
verbs -= /test_verbs/Remove_Overlay
Every item made from the parent obj has the Add and Rem procs. However, each of the children items are customized as follows:
icon = 'child.dmi'
p_layer = CHILD_LAYER
usr.child = src
usr.child = null
This allows me to modify where the object goes on the player. The Add() proc works fine, it adds the overlay and sets the usr.child to src. The problem comes when I try to remove the child from the player. It sets the usr.child to null, like it's supposed to, and modifies the verbs, but it will not remove the overlay. Oh, the verbs are simple calls to the procs, nothing else.
Can anyone see what I'm doing wrong?
I tried something and found that if I move the Rem() proc to the lowest child, it works. But only if it's the final child of that type. I'd still like to know why it doesn't work through inheritance, because it would make my life a LOT easier.