Game Development Community

Event listeners not being deleted when object is unregistered

by rwillis · in Torque X 2D · 10/20/2007 (6:08 pm) · 0 replies

When resetting my level after the player dies I need to silence my events in the component's UnRegister method. If I don't then that component from the previously loaded level still receives events even though it's not registered. To fix this I silence events in the UnRegister method of the component. Am i suppoed to be doing this (calling silence event in UnRegister)? Or am I not UnRegistering the object right?