This action is designed only for Objects of type
MT_EGGMOBILE3 (Sea Egg), and will not have the same effect for other types of Objects.
A_Boss3TakeDamage is an action that is called when the Sea Egg takes damage, to allow it to start moving along the paths of boss waypoints again. The actor's threshold is set to the Parameter value – or the number multiplied by 4096 added to the Thing type number – of its target's spawn point Thing; for the Sea Egg, this determines the next waypoint for it to move to. The actor's
movecount value is set to the value determined by Var1, which for the Sea Egg determines whether to fire at the player or not before moving (0 = no, 1 = yes).
Code – A_Boss3TakeDamage
// Function: A_Boss3TakeDamage
// Description: Called when Boss 3 takes damage.
// var1 = movecount value
// var2 = unused
void A_Boss3TakeDamage(mobj_t *actor)
if (LUA_CallAction("A_Boss3TakeDamage", actor))
actor->movecount = var1;
if (actor->target && actor->target->spawnpoint)
actor->threshold = actor->target->spawnpoint->extrainfo;