Actions
Actions determine what an Object defined in a SOC does during a given state. They are used to control the interaction of Objects with the player and the level environment. During any state, an Object can perform one of the 118 actions coded into SRB2, although it does not need to perform one during every state. Some Objects, such as static scenery Objects, do not perform any actions at all because they do not need to interact with their environment in any way.
The Object that performs an action is called the actor. Additionally, actions can assign a target or a tracer Object as additional reference Objects. They are used for actions that need to be performed in relation to another Object. For example, a shooting action will fire a projectile at the target; a movement attack will make the actor move towards the target. The difference between the two is that the actor needs to see the target to perform an action related to it, while the tracer does not need to be in sight. Some actions will set these themselves if they are necessary, but they can also be set manually with the actions A_FindTarget and A_FindTracer, respectively.
Some actions allow for modifications of their behavior through two variables, called Var1 and Var2. Their effect depends entirely on the action they are used with. For some of the more complicated actions, SRB2 divides these variables into upper and lower bits, essentially creating four distinct parameters to allow for more flexible control. In these, the value of the variable is calculated as the desired upper bit value multiplied with 65536 plus the desired lower bit value.
Normally, only a single action can be performed during one state. However, the action A_DualAction allows for two actions to be executed in one state while with a state duration of 0, meaning that the Object will change into the next state instantly, allowing it to perform the next action immediately. Objects can not perform actions in their SpawnState unless they have the MF_RUNSPAWNFUNC (value 2147483648) flag checked.
Contents |
Movement Actions
- A_BunnyHop
- A_CapeChase
- A_ChangeAngleAbsolute
- A_ChangeAngleRelative
- A_Chase
- A_FaceTarget
- A_FishJump
- A_MaceRotate
- A_MouseThink
- A_MoveAbsolute
- A_MoveRelative
- A_RotateSpikeBall
- A_ScoreRise
- A_SkullAttack
- A_SnowBall
- A_SparkFollow
- A_Thrust
- A_ZThrust
Enemy Thinkers
- A_BuzzFly
- A_CrawlaCommanderThink
- A_DetonChase
- A_GuardChase
- A_HoodThink
- A_JetbThink
- A_JetChase
- A_JetJawRoam
- A_JetJawChomp
- A_JetgShoot
- A_JetgThink
- A_MinusCheck
- A_MinusDigging
- A_MinusPopup
- A_PointyThink
- A_SharpChase
- A_SharpSpin
- A_SkimChase
- A_SnailerThink
- A_VultureCheck
- A_VultureVtol
Boss Actions
- A_Boss2PogoSFX
- A_Boss3TakeDamage
- A_BossDeath
- A_BossFireShot
- A_BossJetFume
- A_BossScream
- A_DeInvinciblerize
- A_Invinciblerize
Ring Actions
Powers and Monitors
- A_1upThinker
- A_BombShield
- A_CustomPower
- A_EggmanBox
- A_ExtraLife
- A_ForceShield
- A_GiveWeapon
- A_GravityBox
- A_Invincibility
- A_JumpShield
- A_MixUp
- A_MonitorPop
- A_RecyclePowers
- A_RingBox
- A_RingShield
- A_SuperSneakers
- A_WaterShield
Projectiles
- A_DropMine
- A_FireShot
- A_LobShot
- A_ShootBullet
- A_SuperFireShot
- A_SuperTurretFire
- A_TurretFire
- A_TurretStop
Spawners
Sound Actions
Remote Actions
Property Modifiers
- A_ChangeColorAbsolute
- A_ChangeColorRelative
- A_FindTarget
- A_FindTracer
- A_SetObjectFlags
- A_SetObjectFlags2
- A_SetReactionTime
- A_SetTargetsTarget
- A_SetRandomTics
- A_SetTics