A_SetTics is an action that sets the duration of the calling state. Var1 determines the number of tics the state lasts for. You can also set it to 0 and set Var2 to use the actor's threshold value. It can be useful for overriding the auto-adjusting of the player's walking/running/rolling/falling animation durations based on speed, but otherwise it is normally useless for custom SOCs unless forced on the actor via
A_RemoteAction. In SRB2, the Pop-up Turret uses this action to set the delay between each time it pops up to fire a bullet at the player, its threshold value being determined by the angle set when placed on the map. This action is also used by
A_RockSpawn to determine the time in tics it takes to spawn a rock.
Code – A_SetTics
// Function: A_SetTics
// Description: Sets the animation tics of an object
// var1 = tics to set to
// var2 = if this is set, and no var1 is supplied, the mobj's threshold value will be used.
void A_SetTics(mobj_t *actor)
INT32 locvar1 = var1;
INT32 locvar2 = var2;
if (LUA_CallAction("A_SetTics", actor))
actor->tics = locvar1;
else if (locvar2)
actor->tics = actor->threshold;