|| This article or section is incomplete. It doesn't have all of the necessary core information on this topic. Please help the SRB2 Wiki by finishing this article.
A_FireShot is an action that makes the actor fire an Object at the target. Var1 determines the Object type the actor fires. Var2 determines the height offset the chosen Object is fired from, relative to a default offset of 48 fracunits above the bottom of the actor (negative values can be used). When the actor fires the chosen Object, the
SeeSound of the fired Object is played. In SRB2, this is used by the Robo-Hood to fire its arrows.
ReactionTime*70) sets the actor's new reaction time. In Ultimate mode, the actor's new reaction time is set to
ReactionTime*35) instead. However, if the actor has
MF_BOSS, the actor's reaction time will not be changed.
| Object property
SeeSound (of Object being shot)
| Played when fired
| New reaction time (|
ReactionTime*TICRATE in Ultimate mode)
Code – A_FireShot
// Function: A_FireShot
// Description: Shoot an object at your target.
// var1 = object # to shoot
// var2 = height offset
void A_FireShot(mobj_t *actor)
INT32 locvar1 = var1;
INT32 locvar2 = var2;
if (LUA_CallAction("A_FireShot", actor))
if (actor->eflags & MFE_VERTICALFLIP)
z = actor->z + actor->height - FixedMul(48*FRACUNIT + locvar2*FRACUNIT, actor->scale);
z = actor->z + FixedMul(48*FRACUNIT + locvar2*FRACUNIT, actor->scale);
P_SpawnXYZMissile(actor, actor->target, locvar1, actor->x, actor->y, z);
if (!(actor->flags & MF_BOSS))
actor->reactiontime = actor->info->reactiontime*TICRATE;
actor->reactiontime = actor->info->reactiontime*TICRATE*2;