Projectile
Projectiles |
---|
Projectiles, also commonly known as missiles, are special Objects in SRB2 that are generally designed to be fired, tossed, or thrown at something, for instance the players themselves. In general, projectiles will explode or be destroyed on contact with any floors, walls, and solid objects, inflicting damage on any damageable objects they hit if any. If projectiles hit the sky however, they will simply be removed from the map instead of exploding.
For projectiles themselves, their target Object is treated as the Object that fired it (whether or not it actually did), preventing them from colliding with the Object. However, this means that a number of the actions pre-existing that target an Object should not be used if the missile is meant to home in on the Object; for this reason, the projectile should set the Object as the tracer instead, and an appropriate action that homes in on the tracer used instead.
Projectiles will never have any friction applied to them whatsoever, even when they can collide with the floor. They will also be able to pass through non-solid linedefs with either Flag [0] / Impassable or Flag [1] / Block Enemies checked on them.
Projectiles in SRB2
Nearly all projectiles in SRB2 are not actually Things for placement on the map, so they are listed here by Object type instead:
Object type | Name | Description |
---|---|---|
MT_DETON
|
Deton | A special type of projectile that is also a type of enemy. |
MT_EGGMOBILE_FIRE
|
Egg Mobile laser fire trail | Is not intended to move, but can still damage players. |
MT_BLACKEGGMAN_GOOPFIRE
|
v2.0 Brak Eggman goop | Does not explode on collision with objects or the floor, instead it traps any players touching it until it disappears. |
MT_BLACKEGGMAN_MISSILE
|
v2.0 Brak Eggman missile | A special type of projectile that the player can jump on and ride. |
MT_CYBRAKDEMON_MISSILE
|
v2.1 Brak Eggman missile | |
MT_CYBRAKDEMON_FLAMESHOT
|
v2.1 Brak Eggman flame | |
MT_CYBRAKDEMON_NAPALM_BOMB_LARGE
|
v2.1 Brak Eggman large bomb | |
MT_CYBRAKDEMON_NAPALM_BOMB_SMALL
|
v2.1 Brak Eggman small bomb | |
MT_CYBRAKDEMON_NAPALM_FLAMES
|
v2.1 Brak Eggman bomb flame | |
MT_SPINFIRE
|
Elemental Shield's fire trail | Is not intended to move, but can still damage players/enemies. |
MT_ROCKET
|
Snailer missile | |
MT_LASER
|
Egg Mobile laser | |
MT_TORPEDO
|
Sea Egg torpedo | |
MT_TORPEDO2
|
Fake Sea Egg torpedo | |
MT_MINE
|
Jetty-Syn Bomber's/Skim's mine | A type of projectile that is dropped instead of thrown. |
MT_JETTBULLET
|
Jetty-Syn Gunner's/Pop-up Turret's bullet | |
MT_TURRETLASER
|
Turret laser | |
MT_CANNONBALL
|
Launched Cannonball | |
MT_ARROW
|
Robo-Hood arrow | Can adjust its state depending on direction. |
MT_DEMONFIRE
|
Trapgoyle fireball | |
MT_FLAMEJETFLAME
|
Flame Jet flame | |
MT_FLAMEJETFLAMEB
|
Spinning Flame Jet flame | |
MT_REDRING
|
Thrown red ring/Rail Ring | |
MT_THROWNBOUNCE
|
Thrown Bounce Ring | |
MT_THROWNINFINITY
|
Thrown Infinity Ring | |
MT_THROWNAUTOMATIC
|
Thrown Automatic Ring | |
MT_THROWNSCATTER
|
Thrown Scatter Ring | |
MT_THROWNEXPLOSION
|
Thrown Explosion Ring | |
MT_THROWNGRENADE
|
Thrown Grenade Ring | |
MT_FIREBALL
|
Fire Flower fireball | Unlike most projectiles, this bounces off floors instead of exploding on contact with them. |
MT_KOOPAFLAME
|
King Bowser's flame | |
MT_NAMECHECK
|
Seenames helper | Technically this is a projectile, as it is shot at players to get their names, though it should not be used outside of its intended purpose. |
Several other Object types are treated by the game like projectiles, but do not have the MF_MISSILE
flag unlike the Object types listed above. Typically they have the MF_PAIN
flag instead, making them harmful only to the player. These are as follows:
Object type | Name | Description |
---|---|---|
MT_UNIBALL
|
Unidus's spike ball | These are detached from the Unidus and are destroyed on contact with Objects or walls due to the action A_UnidusBall .
|
MT_EGGMOBILE_BALL
|
Egg Mobile's spike ball | Same as with MT_UNIBALL , except for the Egg Mobile.
|
MT_GOOP
|
Egg Slimer goop | On contact with the floor, these will stop moving. These will not disappear on their own by default; this occurs because A_Boss2Chase and A_Boss2Pogo give them a fuse of 10*TICRATE when they are spawned.
|
MT_ENERGYBALL
|
Metal Sonic energy ball | These will not be destroyed on contact with other Objects or walls, and will pass through floors/ceilings. |
MT_HAMMER
|
King Bowser's hammer | These will disappear from the map on contact with the floor. |
Custom projectiles
It is possible to make custom projectiles for SRB2 with the use of SOCs. To make an Object behave like a projectile, it needs to be given the MF_MISSILE
flag.
Object flags
A number of others object flags may be given for extra effects for projectiles:
MF_NOCLIPTHING
: When a projectile has exploded once, this will be automatically set to its flags to prevent the Object from exploding again.
MF_GRENADEBOUNCE
: Instead of exploding on collision with the floor, the projectile will bounce off it instead, playing the Object'sActiveSound
for every collision until it stops bouncing.
MF2_BEYONDTHEGRAVE
: This is automatically given to projectiles for whom the original player object that fired it has since respawned after dying.
MF2_DEBRIS
: Projectiles with this flag will not playDeathSound
when exploding.
MF2_SUPERFIRE
: Normally projectiles will not affect super players, but when projectiles have this flag they can stun them and knock them back for a small distance.
- Some of the weapon ring flags will also affect the knockback strength of a projectile for when it hits a player:
MF2_RAILRING
: Increases knockback strength greatly to 45 FU/tic; combined withMF2_EXPLOSION
this is reduced to 38 FU/tic.MF2_EXPLOSION
: Increases knockback strength greatly to 30 FU/tic; combined withMF2_RAILRING
this is increased further to 38 FU/tic.MF2_SCATTER
: Knockback strength depends on distance the projectile is from the firer: weakest is 4 FU/tic, strongest is 128 FU/tic. OverridesMF2_RAILRING
/MF2_EXPLOSION
knockback.
Object properties
The following properties control some of the projectile's behavior:
SeeSound
: Most actions and similar that are associated with firing projectiles will usually play this sound when an Object has been fired using them; however this can in fact apply for non-projectiles as well as projectiles themselves, but it is assumed that the latter particularly are to be fired by them anyway.DeathState
: When a projectile collides with anything other than its target, this will be used for the projectile's explosion as it should then disappear from the map afterwards normally; the projectile'sDeathSound
will also be played in this situation.Speed
: The speed at which projectiles are fired at by most actions etc; same applies to this as withSeeSound
however.ActiveSound
: the sound played when a projectile withMF_GRENADEBOUNCE
collides with the floor.
Related actions
- A_CrawlaCommanderThink: Thinker for the Crawla Commander, which can optionally fire a projectile at the player.
- A_JetbThink and A_DropMine: Thinkers for the Jetty-syn Bomber and the Skim, which drop mines on the player from above.
- A_JetgShoot: Firing attack for the Jetty-syn Gunner.
- A_BossFireShot/A_BrakFireShot: Firing attacks for various bosses, which fire projectiles from pre-set offsets relative to the actor.
- A_Boss7FireMissiles: Fires four projectiles of a specified type from around the actor's middle. Used by v2.0's Brak Eggman to fire grabbable missiles at the player.
- A_FireShot/A_SuperFireShot: Fires a projectile and resets the actor's reaction time.
- A_LobShot/A_BrakLobShot: Lobs an Object at the target instead of firing it directly.
- A_ShootBullet: The most generic firing action, which simply fires a projectile.
- A_SnailerThink: Shoots a projectile without facing the target.
- A_TurretFire/A_SuperTurretFire: Gives the actor
MF2_FIRING
so a projectile of a particular type can be thrown constantly. - A_TurretStop: Stops the firing started by
A_TurretFire
orA_SuperTurretFire
. - A_SplitShot: Shoots a missile at either side of the actor's target.
- A_MissileSplit: When used on a projectile with the
MF_MISSILE
flag, splits off a second projectile. - A_MultiShot: Shoots multiple projectiles horizontally that spread evenly.
- A_TrapShot: Shoots projectiles in a particular direction rather than at a target.
Object types | [view] | |
General | Enemy • Boss • Pushable • Spring • Monitor • NiGHTS power-up • Projectile • Ambient sound effect | |
Special | Player • Shields • Flickies • Overlay | |
Related links | List of Object types |