GarageGames/Torque3D — pull request #911 by Winterleaf (2014-11-06 17:44:08+00:00)
Title: This feature adds a tick counter with interval to every object.

It can be used client or server side.

This is useful when you want to be notified every X ticks that an object processes.

Usages: Rotating an object every so many ticks, tracking spell recycles, etc.

Example:

Where you create your player object add:
%player.EnableCounters = true;
%player.TickCounterAdd("TestCounter",100);

Then add
function Player::onTickCounter(%this,%counterName)
{
echo("--------->" @ %counterName);
}

It has several functions
-TickCounterAdd
-TickCounterRemove
-TickCounterGetInterval
-TickCounterReset
-TickCounterHas
-TickCounterSuspend
-TickCountersClear