Projectile Components

From Cosmoteer Wiki
< Modding‎ | Projectile (modding)Modding/Projectile/Components
Jump to navigation Jump to search

Code locations (what's this?):

Cosmoteer.Bullets.BulletComponent
Cosmoteer.Bullets.BulletComponentRules
Cosmoteer.Bullets.IBulletComponent

These components are made only for projectiles (typically shot from weapons), not for parts you can build.

For more details, click on the component's name.

CalloutIconWarning.pngWork in Progress
This list is currently work-in-progress. Some things may be missing.

Feel free to contribute to make it better!

CalloutIconTip.pngTip
Sort according to your needs by clicking the headers.
Components and inheritance
Name Category Short description

(click a component for more details)

Code Reference

(what's this?)

Inherits from
BoxPhysics 🧲Projectile physics Makes the projectile's collision shape a rectangle.

Used by missiles.

Cosmoteer.Bullets.Physics.BulletBoxPhysics
BulletPhysics
CirclePhysics 🧲Projectile physics Makes the projectile's collision shape a circle.

Used by bullets and mines.

Cosmoteer.Bullets.Physics.BulletCirclePhysics
BulletPhysics
Physics 🧲Projectile physics Parent class for managing the physics of a projectile.

Not used by beams.

Cosmoteer.Bullets.Physics.BulletPhysics
-
Acceleration 🧲Projectile physics Moves the projectile in a direction, more over time. Cosmoteer.Bullets.Physics.BulletAcceleration
BulletComponent
TargetHoming 🧲Projectile physics Causes the attached bullet to rotate towards its target. Cosmoteer.Bullets.Physics.BulletTargetHoming
BulletComponent
DeathByLifetime 💀Projectile death Destroys the projectile after some time.

Can presumably be used as a trigger without destroying it.

Cosmoteer.Bullets.Death.BulletDeathByLifetime

BaseBulletDeath
DeathByEnemyProximity 💀Projectile death Destroys the projectile near enemies. Can transform it.

Can be used as a trigger without destroying it.

Cosmoteer.Bullets.Death.BulletDeathByEnemyProximity
BaseBulletDeath
SpawnBullets 🎯Hit effect Spawns projectiles. Cosmoteer.Simulation.HitEffects.SpawnBulletsEffectRules
HitEffectRules
BulletSimpleHitRules 💥Hit rules What happens when the projectile hits. Cosmoteer.Bullets.Hits.BulletSimpleHitRules
BulletComponentRules
BulletPenetratingHitRules 💥Hit rules What happens when the projectile hits. This one can penetrate parts. Cosmoteer.Bullets.Hits.BulletPenetratingHitRules
BulletComponentRules
AnimatedSprite 🎨Visuals Renders an animated sprite on the projectile.

It makes it visible by having visuals.

Cosmoteer.Bullets.Graphics.BulletAnimatedSpriteRules
BulletComponentRules

Miscellaneous

These are not components, but you may still want to know about them to use projectile components.

FrameOfReference

An internal enum at Cosmoteer.Bullets.BulletFrameOfReference. Inherits nothing. Possibles values :

  1. Grid : "The frame of reference will be the background grid, i.e. zero velocity."
  2. Inherit : "The frame of reference should be the frame of reference of the object that spawned the bullet. If the spawner object is a ship, the frame of reference will be the ship's velocity."
  3. Bullet : "The frame of reference should be the bullet's current velocity."
  4. HitObject : "The frame of reference should be the hit object's velocity at the time of impact."

Hit

Hit : an internal class at Cosmoteer.Bullets.Hits, for when projectiles hit things, or even nothing.

Notes

  • Projectiles can only have 1 Physics component. Choose one between BoxPhysics and CirclePhysics .
  • The ion beam is not a real projectile : ion_beam.rules is referenced by the BeamEmitter part component in ion_beam_emitter.rules to fetch the values it needs to work with this code :
    BeamEmitter : <./Data/shots/ion_beam/ion_beam.rules>
    {
    	Type = BeamEmitter
    	//...
    }
    

See also