Skip to content

PatternData Resource

Namespace: SpaceUsurper

Inheritance: ObjectHotloadedData → PatternData

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<PatternData>)
advanceImmediately If true, update the bullet pattern immediately (shoot first volley, so subsequent actions can affect its bullets).
aimMode
aimSpeed
alwaysTargetClosestPlayer
angleOffset Amount of degrees to offset current bullet's angle.
arcAngle What angle to spread spokes over (when 0 or 360, use the whole circle).
arcEasingType How the bullets in an arc are laid out.
attachChildBulletsToBulletAnchor If true, bullets in this pattern will have their parent bullet set to this pattern's bullet anchor, if it exists.
autoUpdateTargetPlayer
behaviour
bulletIndex Decides which bullet is used for a given shot.
bulletLifetimeMultiplier Amount to scale each bullet's lifetime by.
bullets The paths of the different bullets used in the pattern.
bulletSizeMultiplier Amount to scale each bullet's size by.
bulletVelocityMultiplier Amount to scale each bullet's velocity by.
changeTargetPlayerOnDeath In co-op, should this pattern pick a new target player if the old target dies.
chargeColor
chargeColorEasingType
chargeLookLerpPercent How quickly the pattern's anchor core looks in the aim direction while charging.
chargeLookPercent How far the pattern's anchor core looks in the aim direction while charging.
constantRotation If true, handle rotation every update, instead of only when firing a volley.
customBulletAngle The angle of a given bullet in an custom pattern.
customBulletPos The position of a given bullet in an custom pattern.
customPatternPos The position of the pattern for the current volley, for a custom pattern.
debugText
debugVector
despawnChildBulletsWhenFinished If true, remove all bullets we've fired when we finish for any reason.
despawnWhenAnchorInactive If true, remove pattern if the anchor doesn't exist any longer (defaults to true).
dragBullets Whether bullets of this pattern move with the pattern itself in addition to their own movement.
fanAngle Degrees between each bullet, only used for fan pattern shape (defaults to 30f).
fanSubdivide Number of fan bullets each 'spoke' should have.
hitSelfPixels If true, bullets in this pattern can collide with the same pxc that spawned it.
ignoreCollision Units that this pattern should ignore collision with.
impulseVelocity Amount to add to bullet's starting impulse velocity.
inheritAnchorAngle Whether this pattern's angle is set to anchor angle, when attached.
kickbackLerpPercent How fast the kickback lerps.
kickbackPercent How far in the reverse direction the shootLookPercent is adjusted each volley.
kickbackTime How long the kickback lasts for.
linkVolleyBullets If true, all bullets in a volley will despawn if any of them despawn.
maxVibrationDist
name
numBulletsAddition Number of bullets to add or subtract from each volley.
numBulletsInVolley
numVolleys The number of volleys to shoot before finishing. If 0, don't stop until the parent tells it to.
numVolleysAddition Number of volleys to add or subtract.
numVolleysPerShootSfx How many volleys have to happen before playing each shoot sfx.
parallelForce Sideways force to spread out bullets that head in the same direction, only used for parallel pattern shape (applies impulse force to bullets).
parallelSpread Sideways spread for bullets that head in the same direction, only used for parallel pattern shape.
parallelSubdivide Number of parallel bullets each 'spoke' should have.
patternShape Spokes: spread bullets out along the arc angle (default = full circle), Custom: specify the position and angle of each bullet.
positionOffset Amount to offset current bullet's position.
precacheTextures (Inherited from HotloadedData<PatternData>)
properties
recoil Force that's applied to the player/unit for each volley. Only applies when Player.AddPattern is called, not for patterns fired from player guns. "shoot_force" physics element must be defined.
rotateBulletAngles If false, only rotates the position of anchored bullets, not their orientation.
rotateBullets Whether the rotation of this pattern modifies the position of child bullets.
rotateWithAnchor Whether rotation applied to the anchor affects this pattern's rotation.
rotationSpeed
sfxCharge
sfxFinish
sfxStart
sfxVolley
sfxVolleyPitchFactor
sfxVolleyVoiceLimit
sfxVolleyVolumeFactor
shootColor
shootColorEasingType
shootColorPercent
shootColorTime
shootDelay The amount of time each volley (after the first) will be delayed from the previous volley.
shootDelayMultiplier Amount to scale the pattern's shootDelay by.
shootEffectPattern The bulletpattern that is fired whenever a volley is shot.
shootFinishLookTime How long to stay looking in the aim direction after shooting all volleys.
shootLookLerpPercent How quickly the pattern's anchor core looks in the aim direction each volley.
shootLookPercent How far the pattern's anchor core looks in the aim direction each volley.
shootTime How long each shot volley affects the core.
shouldOverrideStatusEffect Decides if the current bullet should be overridden with a status effect.
shouldShoot Whether the current bullet that will be shot, should actually be shot or not (defaults to true).
shouldUseSingleStatusEffect Set to true to select from statusPaths instead of assigning all to cycling status bullet.
startAngle If set, overrides default or target starting angle.
startDelay The amount of time the first volley will be delayed.
statusIndex Which status from statusPaths to use.
statusLevel The amount of status levels to add. Takes precedence over BulletData.statusLevel.
statusPaths The status effects that can be used to override.
targetAimAngle
targetPlayerUpdatePeriod
torque Rotation force applied to units.
useAnchorPos If true, pattern position is continuously set to anchor position (defaults to true).
useRawDeltaTime Ignore time-scaling.
velocity Amount to add to bullet's starting velocity.
vibrationEasingType
vibrationHorizThreshold
vibrationStrength Amount to vibrate at position of pattern, each volley.
vibrationTime
waitForBulletsToDespawn If true, wait for all fired bullets to despawn before removing pattern, else only wait until all have been fired.

Handlers

Name Description
onBullet Called only once per bullet group in a volley (can contain multiple subdivided bullets).
onCharge Called by PixelGroup, not BulletPattern - you have access to pixelgroup params, not pattern params.
onEachBullet Called whenever the pattern creates a new bullet, set to 'currentBullet' property.
onFinish
onStart
onUpdate
onVolley

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
bulletAngle The start angle of the most recent bullet this pattern shot.
Type: Single
bulletNum The bullet num of the current volley.
Type: Int32
bulletPos The start position of the most recent bullet this pattern shot.
Type: Vector2
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
lastBulletPos The start position of the previous bullet this pattern shot.
Type: Vector2
level An optional variable that can be used to set an Int when creating a pattern (eg. for having increasing difficulty levels of a pattern)
Type: Int32
loopNum Type: Int32
numBullets The total number of bullets in this volley.
Type: Int32
numVolleys The total number of volleys in this pattern.
Type: Int32
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
patternPos The position of this pattern.
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 Type: Rand
ropeCurrLength Type: Single
ropeNumSprings Type: Int32
ropeSpringNum Type: Int32
ropeTotalLength Type: Single
sizeMultiplier The size multiplier to apply to every bullet this pattern fires.
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
this This pattern.
Type: BulletPattern
volleyNum The volley num of the pattern.
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
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
debugToggle Alias of stage.MiscDebugToggle
Type: Boolean
difficulty Alias of stage.Difficulty
Type: Single
diffInt Alias of stage.DifficultyInt
Type: Int32
floatVar Alias of pattern.FloatVar
Type: Single
hasParentBullet Alias of pattern.HasParentBullet
Type: Boolean
intVar Alias of pattern.IntVar
Type: Int32
isDocked Alias of stage.IsDocked
Type: Boolean
isGameOver Alias of stage.IsGameOver
Type: Boolean
isPaused Alias of stage.IsPaused
Type: Boolean
isPlayerCollidingWithPixel Alias of player.IsCollidingWithPixel
Type: Boolean
isSwitch Alias of stage.IsSwitch
Type: Boolean
lastVolleyTime Alias of pattern.LastVolleyShootTime
Type: Single
maxPlayerInvulnPercent Alias of stage.MaxPlayerInvulnPercent
Type: Single
nspc Alias of pattern.NumShotPatternsConstant
Type: Int32
numAlivePlayers Alias of stage.AlivePlayerCount
Type: Int32
numChildBullets Alias of pattern.NumChildBullets
Type: Int32
numPlayers Alias of stage.PlayerCount
Type: Int32
numShotPatterns Alias of stage.NumShotPatterns
Type: Int32
numShotPatternsConstant Alias of pattern.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
parentBullet Alias of pattern.ParentBullet
Type: Bullet
patternNum Alias of pattern.PatternNum
Type: Int32
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 pattern.PatternNum
Type: Int32
pp Alias of pattern.PatternProgress
Type: Single
rawStageTime Alias of stage.RawFixedElapsedTime
Type: Single
song Alias of stage.SongHandler.Song
Type: Song
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
timeScale Alias of stage.TimeScaleHandler.CurrentTimeScale
Type: Single
timeSinceVolley Alias of pattern.TimeSinceLastVolley
Type: Single
vectorVar Alias of pattern.VectorVar
Type: Vector2