Skip to content

BulletData Resource

Namespace: SpaceUsurper

Inheritance: ObjectHotloadedData → BulletData

Note

This resource type supports #include, so it can inherit properties from other resources of the same type.

Properties

Name Description
#include (Inherited from HotloadedData<BulletData>)
alwaysTargetClosestPlayer
anchored Set this to true if something else moves this bullet (eg. parent pattern).
autoUpdateTargetPlayer
borderWarningColor The color of the bullet when just out of camera bounds (uses current colorA when not set).
borderWarningGlow How much the bullet glows when just out of camera bounds.
borderWarningMinOpacity How opaque the edges of the border warning are.
bounds
bulletArchetypeIgnoreOnUpdate
cantBeDestroyed
cantBeIgnored If true, player's IgnoreBulletDamage property won't prevent bullet's damage or onHitPlayer handler.
changeTargetPlayerOnDeath In co-op, should this bullet pick a new target player if the old target dies.
circleSkew Amount of skew (stretching in forward direction) when bullet traveling at max skew speed.
circleSkewDist Distance (per fixed frame) required for full skew.
circleSkewEasingType
clampToBounds If true, force bullet to be inside its bounds.
clampToBoundsVelocityDamping If clampToBounds is true, damping of 0 will not affect velocity of clamped bullets, 1 will remove it completely.
collideInAllDirections If true, bullet rotates the direction it checks for collisions with pixels, and doesn't resolve visual overlaps (defaults to false). Used for turrets/drones/etc.
collideWithPixels
colorBlinkEasingType Defaults to QuadInOut.
colorBlinkStartTime So that bullets in the same volley can have different color timing offsets.
debugText
debugVector
depthLevel
despawnAfterKeyframes If true, bullet despawns as soon as it runs out of keyframes, regardless of its lifetime.
despawnOnDeath If true, despawn if target player dies.
despawnOnPlayerHit Defaults to true.
despawnStyle
despawnTime
despawnWhenAllPatternsRemoved If true, this bullet despawns when all patterns added to it through Bullet.AddPattern have despawned. Defaults to false.
despawnWhenAnyPatternsRemoved If true, this bullet despawns when any patterns added to it through Bullet.AddPattern has despawned. Defaults to false.
disableBulletArchetypeGeneration Don't try to generate a BulletArchetype class for this bullet type.
dontCheckBounds If true, don't disable this bullet based on being outside of arena.
extraFrameSize Number of extra spritesheet frames to use instead - (N+1)x(N+1) instead of 1x1.
flipX
flipY
force How much force it applies to pxcs it hits (also affected by pixelDamagePercent).
grazeSize
ignorePlayerCollision Don't EVER collide with player - for when using bullet as visual effect, or when shot by player.
impactPattern
impulseFrictionPercent How quickly the bullet slows down impulse velocity (default is 0.05).
isPlayerBullet Whether the bullet should be considered to be shot by the player.
isStrictlyVisual Can never be Affected, Repelled, Destroyed, etc. Use for background bullets or other visual effects.
isUnobtainable Used for status bullets - evaluated each frame and powerup cannot be collected while true.
keyframes
lifetime
mass How well the bullet resists being repelled (if unset, it defaults to 1).
maxGrazeAngle TODO: only supported by BulletArchetype bullets.
minGrazeAngle TODO: only supported by BulletArchetype bullets.
noCollisionLeniency For small bullets, don't have a smaller hitbox than visuals when colliding with player.
outOfBoundsRadiusFactor How far off camera until this bullet is removed (multiplied by out radius) (defaults to 4f). (also used for border warning range)
parallaxSpeed
partDamageFactor Damage multiplier when hitting a part instead of a single pixel (default is 1).
playerDamageDir When player is hit by this bullet, which direction should force be applied to player (by default, towards player, away from bullet center).
precacheTextures (Inherited from HotloadedData<BulletData>)
proximityRange
proximityUnits
pushStrength Amount of force the bullet applies against a grazing player (default is 0.4).
quickReflect Reflect instantly instead of animating.
reflectLimit Number of times bullet can reflect before despawning automatically.
sfxHitPixel
sfxHitPlayer
shapeType
shouldLoop
shouldOverrideStatusEffect Decides if the current bullet should be overridden with a status effect.
shouldReflect If bullet should reflect when hitting a pixel.
spriteForwardOffset Amount the sprite is adjusted in forward direction.
spriteScale Extra scale for sprite.
startFacingAngle Start with this rotation instead of facing the current direction.
startMoveAngle Start with this move angle instead of moving in the pattern's current direction.
startSpeed
statusCycleTime If this bullet has overridden statuses, this is the time to cycle between them.
statusLevel The amount of status levels to add.
statusPaths The status effects that can be used to override.
stopPatternsOnDespawn Whether anchored patterns stop when the bullet is finished.
targetPlayerUpdatePeriod
totalPixelDamage The max amount of damage this bullet can deal.
updateFloatVar
useAbsoluteAngles If true, don't add startAngle to keyframe angles.
useLegacyDamage Only for old replay support.
useRawDeltaTime Ignore time-scaling.

Handlers

Script Parameters

Note

These parameters are available for you to use while writing scripts inside of a resource of this type.

Name Description
anchorFacingAngle The current angle of this pattern's anchor, if any.
Type: Single
anchorVel The current velocity of this pattern's anchor, if any.
Type: Vector2
bullet The current bullet being acted on.
Type: Bullet
bulletAngle The start angle of the most recent bullet this pattern shot.
Type: Single
campaignIndex The stage's index in the campaign.
Type: Int32
corePos The position of the pixelgroup this pattern is anchored to, if any.
Type: Vector2
currentBullet To be used in the BulletPattern.onBullet callback.
Type: Bullet
currentBulletEntity Type: BulletEntity
dt In-game time since the last update (1/60s), modified by timescale.
Type: Single
dtRaw In-game time since the last update (1/60s), unaffected by timescale changes.
Type: Single
fanNum The index of the current bullet inside a fan subdivision.
Type: Int32
hitNormal The impact normal of this bullet.
Type: Vector2
hitPart The part that this bullet collided with.
Type: PixelGroup
hitPixel The pixel that this bullet collided with.
Type: PixelData
hitPos The impact position of this bullet (when it hits a pixel/part).
Type: Vector2
hitUnit The unit that this bullet collided with.
Type: Unit
isStatusSelected Type: Boolean
lastBulletPos The start position of the previous bullet this pattern shot.
Type: Vector2
numVolleys The number of volleys in the parent pattern.
Type: Int32
outOfBoundsNormal The normal value of the edge where this bullet went out of bounds (eg. vec2(-1f, 0f) on the right side of the arena).
Type: Vector2
outOfBoundsPos The position that this bullet went out of bounds at.
Type: Vector2
parallelNum The index of the current bullet inside a parallel subdivision.
Type: Int32
path The path of this pattern's config data.
Type: DataPath<PatternData>
pattern This pattern.
Type: BulletPattern
patternAngle The angle this pattern is facing.
Type: Single
patternDir The direction this pattern is facing.
Type: Vector2
patternStartPos The start position of this pattern.
Type: Vector2
patternTime The elapsed time of this pattern.
Type: Single
player Currently targeted player.
Type: Player
players List of all players.
Type: Player[]
rand Random number generator that should be used for this bullet.
Type: Rand
ropeCurrLength Type: Single
ropeNumSprings Type: Int32
ropeSpringNum Type: Int32
ropeTotalLength Type: Single
stage The currently playing stage.
Type: GameStage
stageHeight The height of the arena.
Type: Single
stagePath The location of this stage's config data.
Type: String
stageSize The size of the arena.
Type: Vector2
stageTime The elapsed time for the current run.
Type: Single
stageWidth The width of the arena.
Type: Single
startAngle The starting angle of this bullet.
Type: Single
statusCharge Type: Single
statusChargePercent Type: Single
this The current bullet being acted on.
Type: Bullet
volleyNum The volley number of the parent pattern when this bullet was fired (first volley is number 0).
Type: Int32
xMax The right boundary of the arena.
Type: Single
xMin The left boundary of the arena.
Type: Single
yMax The upper boundary of the arena.
Type: Single
yMin The lower boundary of the arena.
Type: Single
$version Alias of stage.GetScriptVersion(FILE)
Type: Int32
__bullet_CantBeAffected Alias of bullet.CantBeAffected
Type: Boolean
__bullet_CantBeDestroyed Alias of bullet.CantBeDestroyed
Type: Boolean
__bullet_CantBeIgnored Alias of bullet.CantBeIgnored
Type: Boolean
__bullet_CurrDamageAvailable Alias of bullet.CurrDamageAvailable
Type: Single
__bullet_DataPath Alias of bullet.DataPath
Type: DataPath<BulletData>
__bullet_IgnorePlayerCollisionForKeyframe Alias of bullet.IgnorePlayerCollisionForKeyframe
Type: Boolean
__bullet_PlayerCollideable Alias of bullet.PlayerCollideable
Type: Boolean
__bullet_PxcCollideable Alias of bullet.PxcCollideable
Type: Boolean
__bullet_SourcePlayer Alias of bullet.SourcePlayer
Type: Player
averageMoveInputPercent Alias of stage.PlayerHandler.AverageMoveInputPercent
Type: Single
averagePlayerPos Alias of stage.AveragePlayerPos
Type: Vector2
averagePlayerVel Alias of stage.AveragePlayerVel
Type: Vector2
averageShootInputPercent Alias of stage.PlayerHandler.AverageShootInputPercent
Type: Single
bulletDataPath Alias of bullet.DataPath
Type: DataPath<BulletData>
bulletFanNum Alias of bullet.FanNum
Type: Int32
bulletFrameTime Alias of bullet.ElapsedFrameTime
Type: Single
bulletLastPos Alias of bullet.LastPos
Type: Vector2
bulletMass Alias of bullet.Mass
Type: Single
bulletNum Alias of bullet.BulletNum
Type: Int32
bulletParallelNum Alias of bullet.ParallelNum
Type: Int32
bulletPos Alias of bullet.Position
Type: Vector2
bulletPosA Alias of bullet.PosA
Type: Vector2
bulletPosB Alias of bullet.PosB
Type: Vector2
bulletStartTime Alias of bullet.StartTime
Type: Single
bulletTime Alias of bullet.ElapsedLifetime
Type: Single
bulletTimeScale Alias of bullet.TimeScale
Type: Single
bulletVel Alias of bullet.Velocity
Type: Vector2
childBullet Alias of bullet.ChildBullet
Type: Bullet
collideWithPixels Alias of bullet.CollideWithPixels
Type: Boolean
collideWithPlayer Alias of bullet.CollideWithPlayer
Type: Boolean
crossDist Alias of bullet.CrossDistance
Type: Single
crossWidth Alias of bullet.CrossWidth
Type: Single
damageDealt Alias of bullet.PxcDamageDealt
Type: Single
debugToggle Alias of stage.MiscDebugToggle
Type: Boolean
difficulty Alias of stage.Difficulty
Type: Single
diffInt Alias of stage.DifficultyInt
Type: Int32
dir Alias of bullet.AliasDir
Type: Vector2
facingAngle Alias of bullet.FacingAngle
Type: Single
facingDir Alias of bullet.FacingDirection
Type: Vector2
facingSpeed Alias of bullet.AliasFacingSpeed
Type: Single
floatVar Alias of bullet.FloatVar
Type: Single
forceStrength Alias of bullet.CurrForceStrength
Type: Single
hasParentBullet Alias of pattern.HasParentBullet
Type: Boolean
hasParentPattern Alias of bullet.HasParentPattern
Type: Boolean
intVar Alias of bullet.IntVar
Type: Int32
isAnchored Alias of bullet.IsAnchored
Type: Boolean
isDespawning Alias of bullet.IsDespawning
Type: Boolean
isDocked Alias of stage.IsDocked
Type: Boolean
isGameOver Alias of stage.IsGameOver
Type: Boolean
isPaused Alias of stage.IsPaused
Type: Boolean
isPlayerBullet Alias of bullet.IsPlayerBullet
Type: Boolean
isPlayerCollidingWithPixel Alias of player.IsCollidingWithPixel
Type: Boolean
isPositive Alias of bullet.IsPositive
Type: Boolean
isPowerup Alias of bullet.ShouldOverrideStatus
Type: Boolean
isRedirected Alias of bullet.IsRedirected
Type: Boolean
isStatusBullet Alias of bullet.IsStatusVisualBullet
Type: Boolean
isSwitch Alias of stage.IsSwitch
Type: Boolean
keyNum Alias of bullet.AliasKeyNum
Type: Int32
keyProgress Alias of bullet.AliasKeyProgress
Type: Single
lastVolleyTime Alias of pattern.LastVolleyShootTime
Type: Single
length Alias of bullet.Length
Type: Single
level Alias of bullet.Level
Type: Int32
lifetimeProgress Alias of bullet.AliasLifetimeProgress
Type: Single
loopNum Alias of bullet.LoopNum
Type: Int32
maxPlayerInvulnPercent Alias of stage.MaxPlayerInvulnPercent
Type: Single
moveAngle Alias of bullet.AliasMoveAngle
Type: Single
moveMode Alias of bullet.MoveMode
Type: BulletMoveMode
nspc Alias of bullet.NumShotPatternsConstant
Type: Int32
numAlivePlayers Alias of stage.AlivePlayerCount
Type: Int32
numBullets Alias of bullet.NumBullets
Type: Int32
numChildBullets Alias of pattern.NumChildBullets
Type: Int32
numKeyLoops Alias of bullet.AliasNumKeyLoops
Type: Int32
numPlayers Alias of stage.PlayerCount
Type: Int32
numShotPatterns Alias of stage.NumShotPatterns
Type: Int32
numShotPatternsConstant Alias of bullet.NumShotPatternsConstant
Type: Int32
numSpawnedPatterns Alias of stage.NumSpawnedPatterns
Type: Int32
numSpawnedPatternsConstant Alias of pattern.NumSpawnedPatternsConstant
Type: Int32
numUnits Alias of stage.UnitHandler.NumActiveUnits
Type: Int32
opacity Alias of bullet.AliasOpacity
Type: Single
parentBullet Alias of bullet.ParentBullet
Type: Bullet
parentPattern Alias of bullet.ParentPattern
Type: BulletPattern
patternNum Alias of bullet.PatternNum
Type: Int32
patternPos Alias of bullet.AliasPatternPos
Type: Vector2
patternProgress Alias of pattern.PatternProgress
Type: Single
patternStartTime Alias of pattern.StartTime
Type: Single
PI Alias of 3.141593
Type: Single
playerAimAngle Alias of player.Input.AimAngle
Type: Single
playerAimDir Alias of player.Input.AimDirection
Type: Vector2
playerAimInputPercent Alias of player.Input.AimInputPercent
Type: Single
playerAimVector Alias of player.Input.AimVector
Type: Vector2
playerBodyColorA Alias of player.Body.BodyColorA
Type: Color
playerBodyColorB Alias of player.Body.BodyColorB
Type: Color
playerBodyColorC Alias of player.Body.BodyColorC
Type: Color
playerBodyOpacity Alias of player.Body.BodyOpacity
Type: Single
playerBodySize Alias of player.Body.Size
Type: Vector2
playerBodyWidthMods Alias of player.Body.WidthMods
Type: Vector2
playerBoostPercent Alias of player.BoostPercent
Type: Single
playerBrakeInputPercent Alias of player.Input.BrakeInputPercent
Type: Single
playerBrakePercent Alias of player.Body.BrakePercent
Type: Single
playerDamageBonus Alias of player.DamageBonus
Type: Single
playerDeathPercent Alias of player.DeathPercent
Type: Single
playerFacingAngle Alias of player.Body.FacingAngle
Type: Single
playerFacingDir Alias of player.Body.FacingDirection
Type: Vector2
playerGrazePercent Alias of player.Health.GrazePercent
Type: Single
playerGrazePos Alias of player.Health.GrazePos
Type: Vector2
playerGunAngle Alias of player.GunHandler.AimAngle
Type: Single
playerGunDir Alias of player.GunHandler.AimDirection
Type: Vector2
playerGunPos Alias of player.GunHandler.Position
Type: Vector2
playerGunSize Alias of player.GunHandler.Size
Type: Vector2
playerGunWidthMods Alias of player.GunHandler.WidthMods
Type: Vector2
playerIgnoreBulletDamage Alias of player.IgnoreBulletDamage
Type: Boolean
playerIgnoreLaserDamage Alias of player.IgnoreLaserDamage
Type: Boolean
playerInvulnPercent Alias of player.Health.InvulnPercent
Type: Single
playerIsDead Alias of player.IsDead
Type: Boolean
playerIsDying Alias of player.IsDying
Type: Boolean
playerIsIntangible Alias of player.IsIntangible
Type: Boolean
playerIsInvuln Alias of player.Health.IsInvulnerable
Type: Boolean
playerLastHitBullet Alias of player.Health.BulletDamageSource
Type: DataPath<BulletData>
playerLastHitSourceIsBullet Alias of player.Health.PlayerLastDamageSourceIsBullet
Type: Boolean
playerLastHitUnit Alias of player.Health.UnitDamageSource
Type: DataPath<UnitData>
playerLastPos Alias of player.Movement.LastPos
Type: Vector2
playerLastStatusActivated Alias of player.StatusEffectHandler.LastStatusActivatedPath
Type: DataPath<StatusEffectData>
playerLastStatusLevelChangedAmount Alias of player.StatusEffectHandler.LastStatusLevelChangedAmount
Type: Int32
playerLastStatusLevelChangedPath Alias of player.StatusEffectHandler.LastStatusLevelChangedPath
Type: DataPath<StatusEffectData>
playerMoveDelta Alias of player.Movement.MoveDelta
Type: Vector2
playerMoveInputPercent Alias of player.Input.MoveInputPercent
Type: Single
playerMoveVector Alias of player.Input.MoveVector
Type: Vector2
playerNumTimesPreventedDeath Alias of player.Health.NumTimesPreventedDeath
Type: Int32
playerPixelLastCollisionTime Alias of player.LastPixelCollisionTime
Type: Single
playerPos Alias of player.Movement.Position
Type: Vector2
playerRecoilPercent Alias of player.GunHandler.MaxRecoilPercent
Type: Single
playerSelectedStatusPath Alias of player.StatusEffectHandler.SelectedStatusPath
Type: DataPath<StatusEffectData>
playerShootInputPercent Alias of player.Input.ShootInputPercent
Type: Single
playerVel Alias of player.Movement.Velocity
Type: Vector2
playerVelPercent Alias of player.Movement.VelocityPercent
Type: Single
pn Alias of bullet.PatternNum
Type: Int32
pp Alias of pattern.PatternProgress
Type: Single
radius Alias of bullet.Radius
Type: Single
rawStageTime Alias of stage.RawFixedElapsedTime
Type: Single
rectSize Alias of bullet.RectSize
Type: Vector2
rectWidthMods Alias of bullet.RectWidthMods
Type: Vector2
remoteControlPos Alias of bullet.AliasRemoteControlPos
Type: Vector2
rotationSpeed Alias of bullet.AliasRotationSpeed
Type: Single
sizeMultiplier Alias of bullet.AliasSizeMultiplier
Type: Single
song Alias of stage.SongHandler.Song
Type: Song
sourcePlayer Alias of bullet.SourcePlayer
Type: Player
spawnPos Alias of bullet.SpawnPos
Type: Vector2
stageBaseBgColor Alias of stage.BaseBgColor
Type: Color
stageBgColor Alias of stage.BgColor
Type: Color
stageBounds Alias of stage.Bounds
Type: Rect
stageCenter Alias of stage.BoundsCenter
Type: Vector2
stageProgress Alias of stage.ScoringHandler.Progress
Type: Single
stageState Alias of stage.BehaviourHandler.CurrentState
Type: String
statusLevel Alias of bullet.StatusLevel
Type: Int32
timeScale Alias of stage.TimeScaleHandler.CurrentTimeScale
Type: Single
timeSinceVolley Alias of pattern.TimeSinceLastVolley
Type: Single
totalDamage Alias of bullet.TotalPxcDamage
Type: Single
vectorVar Alias of bullet.VectorVar
Type: Vector2