# Where should I initialize a timer variable for my CBM?

**URL:** <https://discourse.cataclysmdda.org/t/where-should-i-initialize-a-timer-variable-for-my-cbm/21640>\
**Category:** The Toolbox\
**Created:** [October 9, 2019, 9:36pm UTC](https://discourse.cataclysmdda.org/t/where-should-i-initialize-a-timer-variable-for-my-cbm/21640 "2019-10-09T21:36:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![HarrisonGreenlee](https://avatars.discourse-cdn.com/v4/letter/h/ecd19e/32.png) [@HarrisonGreenlee](https://discourse.cataclysmdda.org/u/HarrisonGreenlee)\
**Post date:** [October 9, 2019, 9:36pm UTC](https://discourse.cataclysmdda.org/t/where-should-i-initialize-a-timer-variable-for-my-cbm/21640/1 "2019-10-09T21:36:21Z")

</div>

Hello,

I am trying to create a starting CBM that counts down and then, if not removed by an autodoc in time, kills the player. This will add the the game by allowing dungeon speedrun-based challenge-starts.

I have already programmed the logic and created the JSON. However, even after digging through github, I cannot figure out where I should initialize the countdown variable so it is initialized upon being installed or selected at the beginning of the game. Does anybody have any suggestions?

Here is my code:

> <https://github.com/HarrisonGreenlee/Cataclysm-DDA/commit/3ef12ca149a7fd9b7a4148832b5a9dbc571022ef>

Also, slightly off-topic, but I was wondering - does adding the BIONIC\_FAULTY flag add the CBM to the malfunctioning bionics pool that may be installed when a player critical-fails to install a bionic? I am only asking because I don’t want players to be able to accidentally install this CBM.
