Aller au contenu

Photo

Endheartbeat() and creature death


  • Veuillez vous connecter pour répondre
2 réponses à ce sujet

#1
sillyrobot

sillyrobot
  • Members
  • 171 messages
Does death end a heartbeat?


Will Safe_Destroy_Object() clean up heartbeats associated with the object or should EndHeartbeat() be called in all cases?

 

Modifié par sillyrobot, 28 décembre 2009 - 06:12 .


#2
Craig Graff

Craig Graff
  • Members
  • 608 messages
DestroyObject should certainly end the heartbeat, as well as all other events, though double-checking shouldn't be too hard. Keep in mind that only those creatures that have specifically had InitHeartbeat set on them will have a heartbeat to end (such as party members).

#3
sillyrobot

sillyrobot
  • Members
  • 171 messages
Thanks for the reply. I'm using a heartbeat in my Bag of Beans add-in to control the duration of the conjured creature. I'm doing a cleanup pass to prepare for release and noticed I wasn't calling EndHeartbeat() as it destroyed itself.



I just wanted to verify that I wasn't polluting the game with a slowly growing population of heartbeat timers that don't do anything.