- Learn
- Build a Game
- Pacific Wings
- Appendices
- A Logic Reference
Appendix A — Logic Reference
Every Logic Component and Function in Pacific Wings, as it is in the finished game. Each entry stands on its own: read what it does, see what it needs, and build it from its card into your own game. A card’s Shared Variables and Per Instance Variables are the values you can change. A Shared Variable holds one value for the whole Object, under Variables in its Properties. A Per Instance Variable holds one for each placement in the Scene.
A.1 Vertical Shooter Controls
Comes whole from Myth’s templates. Built in Chapter 1, The Fighter Flies.
Flies the Fighter: steers it at moveSpeed with the Move Command, carries it and the camera north at scrollSpeed, keeps it inside the camera view (and topSafeInset meters below its top edge), and tilts it bankAngle degrees toward the side it moves to.
Any ObjectA.2 Fighter Guns
Built in Chapter 2, Machine Guns.
While Fire is held, fires Fighter Tracers north from the muzzles the weapon level's row in Weapon Levels names, as often as that row says.
Any Object- Action Name
fireRateReady- Cooldown Key
"fireRate"
fireRateReady.value == truedata('Weapon Levels', $weaponLevel, 'centerGun') == true- shooter
self- tracer
@self.tracer- muzzle
"Center Muzzle"- tracerSpeed
@self.tracerSpeed- flashParticles
@self.centerFlashParticles
data('Weapon Levels', $weaponLevel, 'wingCannons') == true- shooter
self- tracer
@self.tracer- muzzle
"Left Muzzle"- tracerSpeed
@self.tracerSpeed- flashParticles
@self.wingFlashParticles
- shooter
self- tracer
@self.tracer- muzzle
"Right Muzzle"- tracerSpeed
@self.tracerSpeed- flashParticles
@self.wingFlashParticles
- Sound
Machine Guns
- Cooldown Key
"fireRate"- Seconds
data('Weapon Levels', $weaponLevel, 'fireRateSeconds')
A.3 Remove When Out of View
Built in Chapter 2, Machine Guns.
Removes this Object once it has left every camera view.
Any ObjectA.4 Breaks on Hit
Built in Chapter 3, The First Enemies.
Removes this tracer when it touches an enemy or the Command Bomber.
Any ObjectA.5 Fly South When Seen
Built in Chapter 3, The First Enemies.
Starts this Object flying south at its speed when it first comes into view.
Any Object- Y Velocity
-@self.speed
A.6 Score
Built in Chapter 3, The First Enemies.
Adds the points of every enemy shot down (times the kill-chain multiplier), of every pickup collected, and of every hit on and the shoot-down of the Command Bomber, to $score, until the mission ends.
Any Object- Name
multiplier- Value
1
- Variable
multiplier- Value
data('Kill Chain Multipliers', $chainRow, 'multiplier')
- Variable
$score- Operator
+=- Value
other.enemyStats.points * multiplier
- Custom Event
shotDownScored
event.current == "mission-failed" || event.current == "mission-complete"- Logic Component
Score- State
Disable
- Variable
$score- Operator
+=- Value
@self.wingCannonsPoints
- Variable
$score- Operator
+=- Value
@self.repairCratePoints
- Variable
$score- Operator
+=- Value
@self.commandBomberHitPoints
- Variable
$score- Operator
+=- Value
@self.commandBomberPoints
- Custom Event
commandBomberScored
A.7 Shot Down
Built in Chapter 3, The First Enemies.
When this enemy has no health left, reports enemyShotDown to Game Rules and shotDown to itself, then explodes and is removed.
Any Object- Custom Event
enemyShotDown
- Custom Event
shotDown
- Sound
Plane Break
- Particles
Plane Explosion- Count
@self.explosionParticles- Z Index Offset
2
A.8 Takes Hits
Built in Chapter 3, The First Enemies.
Each Fighter Tracer that hits takes one health and flashes the enemy white.
Any Objectself.enemyStats- Component Value
self.enemyStats.health- Operator
-=- Value
1
- Particles
Flak Burst- Count
@self.hitParticles- Z Index Offset
2
- target
self- flashColor
@self.flashColor- flashSeconds
@self.flashSeconds- settleTint
@self.damageTint
A.9 Tint Sprite (Function)
Built in Chapter 3, The First Enemies.
Tints the target's sprite: color and mode ("multiply" colors the art, "solid" paints every visible pixel).
- Applies to
target- Value
color
- Applies to
target- Property
Mode- Value
mode
- Applies to
target- Property
Enabled- Value
true
A.10 Crashes Into Fighter
Built in Chapter 4, Enemy Fire and Lost Planes.
Destroys this Object with a flak burst when it touches the Fighter.
Any Object- Particles
Flak Burst- Count
@self.crashParticles- Z Index Offset
2
A.11 Fire From Muzzle (Function)
Built in Chapter 4, Enemy Fire and Lost Planes.
The shooter creates one tracer at its muzzle Coordinate, flying in direction at tracerSpeed and turned to face that way, with a muzzle flash.
- Applies to
shooter- Object to Create
tracer- Position Relative To
Self- Self Position
Coordinate- Coordinate
muzzle- Launch Speed
tracerSpeed- Launch Angle
direction
- Applies to
created- Degrees
direction - 90
- Applies to
shooter- Particles
flash- Position Relative To
Coordinate- Coordinate
muzzle- Count
flashParticles- Z Index Offset
2
A.12 Fire When Seen
Built in Chapter 4, Enemy Fire and Lost Planes.
Once in view, fires its tracer from the Gun Muzzle toward the Fighter (kept within aimConeDegrees of south; 0 fires straight south), after firstShotSeconds and then every shotSecondsMin to shotSecondsMax seconds.
Any Object- Timer Name
"enemyFire"- Repeat Every (s)
@self.firstShotSeconds- Ring Once
Yes
- Action Name
aim- shooter
self- fighter
@self.fighter- minimumForwardMeters
@self.minimumForwardMeters- aimConeDegrees
@self.aimConeDegrees
- shooter
self- tracer
@self.tracer- muzzle
"Gun Muzzle"- tracerSpeed
@self.tracerSpeed- flashParticles
@self.muzzleFlashParticles- direction
aim.value- flash
'Enemy Gun Muzzle'
- Sound
Enemy Guns
- Action Name
nextShotSeconds- Minimum
@self.shotSecondsMin- Maximum
@self.shotSecondsMax
- Timer Name
"enemyFire"- Repeat Every (s)
nextShotSeconds.value- Ring Once
Yes
A.13 Lost on Hit
Built in Chapter 4, Enemy Fire and Lost Planes.
When a Fighter Hazard touches the Fighter, the Fighter is lost: it explodes and reports fighterLost (before the Command Bomber's stage the screen also flashes). When its round is over (roundOver, from Rounds), it turns itself off, so nothing can lose the Fighter after the win or while the screen fades to the next round.
Any Object- Custom Event
fighterLost
- Sound
Fighter Lost
- Intensity
@self.shakeIntensity- Seconds
@self.shakeSeconds
$stage < @self.flashBeforeStage- Color
@self.flashColor- Seconds
@self.flashSeconds
- Particles
Plane Explosion- Count
@self.explosionParticles- Z Index Offset
2
- Logic Component
Lost on Hit- State
Disable
A.14 Match Icon to Planes (Function)
Built in Chapter 4, Enemy Fire and Lost Planes.
Shows the icon while more than slot planes are left, and hides it otherwise (the plane flying is not in reserve).
$planes > slot- Applies to
icon
- Applies to
icon- Alpha
0
A.15 Planes
Built in Chapter 4, Enemy Fire and Lost Planes.
Counts the planes left; after a loss, launches a reserve plane if one is left; a Repair Crate adds one (up to maximumPlanes).
Any Object- Variable
$planes- Value
@self.startingPlanes
- Action Name
isPlaying- Game State
Playing
isPlaying.value == true- Variable
$planes- Operator
-=- Value
1
$planes > 0- Timer Name
"launchReserve"- Repeat Every (s)
@self.reserveDelaySeconds- Ring Once
Yes
- Game State
Mission Failed
- Object to Create
@self.fighter- X
$viewMiddleX- Y
$viewMiddleY - @self.reserveStartBelowMiddle
- Applies to
created- Custom Event
startReturnFlight
- Sound
Reserve Plane Arrives
$planes < @self.maximumPlanes- Variable
$planes- Operator
+=- Value
1
A.16 Return Flight
Built in Chapter 4, Enemy Fire and Lost Planes.
Flies a reserve plane up from below the screen to the middle (under the Command Bomber's lane while it is on screen; if the lane closes during the flight, it flies in again, under the lane), protected and blinking, then gives back its controls and guns.
Any Objectself.returnFlightData- Name
belowLaneY- Value
0
- Name
viewTopY- Value
0
- Name
arrivalY- Value
0
- Event
Move 2D Axis Input · Fighter- Mode
Returning (no steering)
- Event
While Fire Is Held · Fighter- Mode
Holding Fire
- Event
When Starting to Hit Anything Tagged Fighter Hazard · Fighter- Mode
Protected
- Variable
arrivalY- Value
$viewMiddleY + $scrollSpeed * @self.returnSeconds
- Variable
viewTopY- Value
arrivalY + $viewHeight / 2
- Variable
belowLaneY- Value
viewTopY - $bomberLaneMeters - @self.belowLaneMeters
belowLaneY < arrivalY- Variable
arrivalY- Value
belowLaneY
- Component Value
self.returnFlightData.laneMetersWhenAimed- Value
$bomberLaneMeters
- Property
Y- Target Value
arrivalY- Seconds
@self.returnSeconds- Ease
Smooth
- Timer Name
"arrived"- Repeat Every (s)
@self.returnSeconds- Ring Once
Yes
- Timer Name
"protectionOver"- Repeat Every (s)
@self.returnSeconds + @self.protectionSeconds- Ring Once
Yes
- Timer Name
"blink"- Repeat Every (s)
@self.blinkSeconds
$bomberLaneMeters > self.returnFlightData.laneMetersWhenAimed- Custom Event
startReturnFlight
- Event
Move 2D Axis Input · Fighter- Mode
Vertical Shooter Controls
- Event
While Fire Is Held · Fighter- Mode
Fire the Guns
- Event
When Starting to Hit Anything Tagged Fighter Hazard · Fighter- Mode
Lost
- Timer Name
"blink"
- Component Value
self.returnFlightData.isDimmed- Value
false
self.returnFlightData.isDimmed == true- Component Value
self.returnFlightData.isDimmed- Value
false
- Component Value
self.returnFlightData.isDimmed- Value
true
- Alpha
@self.dimAlpha
A.17 Show While in Reserve
Built in Chapter 4, Enemy Fire and Lost Planes.
Shows this icon only while the reserve plane it stands for is left.
Any Object- icon
self- slot
self.slot
- icon
self- slot
self.slot
A.18 Track the View
Built in Chapter 4, Enemy Fire and Lost Planes.
Runs on the Main Camera. Each Begin Step it writes where the view is, in Globals that Logic on other Objects reads to place planes, enemies, pickups and scenery relative to the view.
Camera- Variable
$viewMiddleX- Value
self.transform.position.x
- Variable
$viewMiddleY- Value
self.transform.position.y
- Variable
$viewHeight- Value
self.camera.viewport.height
A.19 Best Score
Built in Chapter 5, Title, Pause and Play Again.
Keeps the best score on this device: shows it on the title screen and raises it when a mission ends.
Any Object- Action Name
savedBest- Key
"bestScore"- Default
0
- Variable
$bestScore- Value
savedBest.value
$bestScore > 0- UI Group
"best"
- UI Group
"best"- Visible
No
event.current == "mission-failed" || event.current == "mission-complete"$score > $bestScore- Variable
$bestScore- Value
$score
- Action Name
bestSaved- Key
"bestScore"- Value
$bestScore
A.20 Mission Start
Built in Chapter 5, Title, Pause and Play Again.
Shows the title screen when the game begins, and starts the mission when START MISSION is chosen.
Any Object- Menu Element
Start Menu
- Menu Element
Start Menu
- Game State
Playing
- Operation
Hide- Menu Element
Start Menu
A.21 Pause
Built in Chapter 5, Title, Pause and Play Again.
Esc pauses the world while a mission is being played; RESUME (or Esc, or Enter) carries on. When a round is over (roundOver, from Rounds), it turns itself off: the fade to the next round cannot be paused.
Any Object- Action Name
isPlaying- Game State
Playing
isPlaying.value == true- Menu Element
Pause Menu
- Menu Element
Pause Menu
- Menu Element
Pause Menu- Pause the World
No
- Operation
Hide- Menu Element
Pause Menu
- Custom Event
resumeMission
- Logic Component
Pause- State
Disable
A.22 Play Again
Built in Chapter 5, Title, Pause and Play Again.
Restarts the whole game when PLAY AGAIN is chosen.
Any ObjectA.23 Show the Flight HUD
Built in Chapter 5, Title, Pause and Play Again.
Shows the flight HUD (SCORE and the reserve plane icons) while the mission is being played, and hides it, with the Command Bomber's health bar, when the mission ends.
Any Objectevent.current == "playing"- UI Group
"flight"
- UI Group
"flight"- Visible
No
- UI Group
"commandBomber"- Visible
No
A.24 Weave
Built in Chapter 6, Aces and Heavy Bombers.
Once in view, slides from side to side around where it came into view, turning every weaveSeconds and banking weaveAngle degrees into each turn.
Any Objectself.weaveData- Custom Event
weaveTurn
- Timer Name
"weave"- Repeat Every (s)
@self.weaveSeconds- First Delay (s)
@self.weaveSeconds / 2
- Custom Event
weaveTurn
- Component Value
self.weaveData.weaveSide- Operator
*=- Value
-1
- X Velocity
@self.weaveSpeed * self.weaveData.weaveSide
- Degrees
@self.weaveAngle * self.weaveData.weaveSide
A.25 Drift Sideways
Built in Chapter 7, The Route.
Drifts sideways at driftSpeed between leftX and rightX, turning back at each on the driftTurn timer. It starts at Create and again whenever the Object is moved ahead.
Any Objectself.driftSidewaysData- Custom Event
startDrifting
- Custom Event
startDrifting
self.transform.position.x < ((@self.leftX + @self.rightX) / 2)- Component Value
self.driftSidewaysData.driftSide- Value
1
- Component Value
self.driftSidewaysData.distanceToGo- Value
@self.rightX - self.transform.position.x
- Component Value
self.driftSidewaysData.driftSide- Value
-1
- Component Value
self.driftSidewaysData.distanceToGo- Value
self.transform.position.x - @self.leftX
- X Velocity
@self.driftSpeed * self.driftSidewaysData.driftSide
- Timer Name
"driftTurn"- Repeat Every (s)
(@self.rightX - @self.leftX) / @self.driftSpeed- First Delay (s)
self.driftSidewaysData.distanceToGo / @self.driftSpeed
- Component Value
self.driftSidewaysData.driftSide- Operator
*=- Value
-1
- X Velocity
@self.driftSpeed * self.driftSidewaysData.driftSide
A.26 Move Ahead When Passed
Built in Chapter 7, The Route.
When this piece of scenery has passed below the view, moves it ahead again: gapMin to gapMax meters beyond the scenery furthest ahead, and at least leadMeters above the middle of the view.
Any Object- Name
leadY- Value
0
- Variable
leadY- Value
$viewMiddleY + @self.leadMeters
$furthestSceneryY < leadY- Variable
$furthestSceneryY- Value
leadY
- Action Name
gap- Minimum
@self.gapMin- Maximum
@self.gapMax
- Variable
$furthestSceneryY- Operator
+=- Value
gap.value
- Action Name
newX- Minimum
@self.xMin- Maximum
@self.xMax
- X
newX.value- Y
$furthestSceneryY
- Custom Event
movedAhead
A.27 Reinforcements
Built in Chapter 7, The Route.
Sends one enemy kind in from above the view on the reinforcements timer, from the stage in its Reinforcement Orders row until the Command Bomber approaches; each one only while fewer than cap of that kind are alive.
Any Objectself.reinforcementsData$stage == data('Reinforcement Orders', self.kind, 'fromStage')- Timer Name
"reinforcements"- Repeat Every (s)
data('Reinforcement Orders', self.kind, 'firstSeconds')- Ring Once
Yes
- Name
waitSeconds- Value
0
data('Reinforcement Orders', self.kind, 'perWave')times- Action Name
roomForMore- Object
self.kind- Operator
<- Value
data('Reinforcement Orders', self.kind, 'cap')
roomForMore.value == true- Action Name
laneRoll- Minimum
data('Reinforcement Orders', self.kind, 'xMin')- Maximum
data('Reinforcement Orders', self.kind, 'xMax')
- Component Value
self.reinforcementsData.laneX- Value
laneRoll.value
- Component Value
self.reinforcementsData.laneX- Operator
+=- Value
local.index * data('Reinforcement Orders', self.kind, 'laneStepMeters')
- Component Value
self.reinforcementsData.launchSpeed- Value
data('Enemy Types', self.kind, 'speed')
- Component Value
self.reinforcementsData.launchSpeed- Operator
*=- Value
data('Round Settings', $roundRow, 'enemySpeed')
- Object to Create
self.kind- X
self.reinforcementsData.laneX- Y
$viewMiddleY + @self.aboveCameraMeters- Launch Speed
self.reinforcementsData.launchSpeed- Launch Angle
-90
- Action Name
waitRoll- Minimum
data('Reinforcement Orders', self.kind, 'secondsMin')- Maximum
data('Reinforcement Orders', self.kind, 'secondsMax')
- Variable
waitSeconds- Value
waitRoll.value
- Variable
waitSeconds- Operator
*=- Value
data('Round Settings', $roundRow, 'enemyPace')
- Timer Name
"reinforcements"- Repeat Every (s)
waitSeconds- Ring Once
Yes
- Timer Name
"reinforcements"
A.28 Report Milestone
Built in Chapter 7, The Route.
A marker placed along the route: when it comes into view it tells Game Rules milestoneReached, then removes itself.
Any Object- Alpha
0
- Custom Event
milestoneReached
A.29 Stages
Built in Chapter 7, The Route.
Starts $stage at 1 when the route begins and raises it by one at each milestone, announcing stageReached each time; when no milestones are left it shakes the camera lightly and announces commandBomberApproaching.
Any Object- Variable
$stage- Value
1
- Custom Event
stageReached
- Variable
$stage- Operator
+=- Value
1
- Custom Event
stageReached
- Intensity
@self.shakeIntensity- Seconds
@self.shakeSeconds
- Custom Event
commandBomberApproaching
A.30 Collected by Fighter
Built in Chapter 8, Pickups and Weapon Levels.
When the Fighter touches this pickup, sends collectedEvent, plays its sound and sparkle, and removes the pickup.
Any Object- Custom Event
@self.collectedEvent
- Sound
@self.sound
- Particles
@self.sparkle- Count
@self.sparkleParticles- Z Index Offset
2
A.31 Drop Supply (Function)
Built in Chapter 8, Pickups and Weapon Levels.
By chance, and only while none of that pickup is in the sky, the creator drops the pickup aheadMeters north of the Fighter (or of the middle of the view while no Fighter is flying), at a random x.
- Name
aheadOfY- Value
0
- Action Name
noneInSky- Object
pickup- Operator
<
- Action Name
dropRoll- Minimum
0- Maximum
1
noneInSky.value == true && dropRoll.value < chance- Action Name
fighterInSky- Object
fighter- Operator
>- Value
0
fighterInSky.value == true- Variable
aheadOfY- Value
fighter.transform.position.y
- Variable
aheadOfY- Value
$viewMiddleY
- Action Name
dropX- Minimum
xMin- Maximum
xMax
- Applies to
creator- Object to Create
pickup- X
dropX.value- Y
aheadOfY + aheadMeters
A.32 Drops Pickups
Built in Chapter 8, Pickups and Weapon Levels.
When this enemy is shot down, it may drop a Wing Cannons or a Repair Crate where it is, by its drop chances.
Any Object- Action Name
wingCannonsRoll- Minimum
0- Maximum
1
wingCannonsRoll.value < @self.wingCannonsChance- Object to Create
@self.wingCannons- Position Relative To
Self
- Action Name
repairCrateRoll- Minimum
0- Maximum
1
repairCrateRoll.value < @self.repairCrateChance- Object to Create
@self.repairCrate- Position Relative To
Self- Created As
created2
A.33 Spin
Built in Chapter 8, Pickups and Weapon Levels.
Turns this Object steadily at spinDegreesPerSecond from the moment it exists.
Any Object- Spin
@self.spinDegreesPerSecond
A.34 Supply Drops
Built in Chapter 8, Pickups and Weapon Levels.
Every secondsMin to secondsMax seconds (the first after firstSeconds), may drop a Wing Cannons and a Repair Crate ahead of the Fighter, until the Command Bomber approaches.
Any Object- Timer Name
"supplyDrop"- Repeat Every (s)
@self.firstSeconds- Ring Once
Yes
- creator
self- pickup
@self.wingCannons- fighter
@self.fighter- chance
@self.wingCannonsChance- aheadMeters
@self.wingCannonsAheadMeters- xMin
@self.xMin- xMax
@self.xMax
- creator
self- pickup
@self.repairCrate- fighter
@self.fighter- chance
@self.repairCrateChance- aheadMeters
@self.repairCrateAheadMeters- xMin
@self.xMin- xMax
@self.xMax
- Action Name
waitRoll- Minimum
@self.secondsMin- Maximum
@self.secondsMax
- Timer Name
"supplyDrop"- Repeat Every (s)
waitRoll.value- Ring Once
Yes
- Timer Name
"supplyDrop"
A.35 Weapon Level
Built in Chapter 8, Pickups and Weapon Levels.
Raises $weaponLevel by one for each Wing Cannons collected (up to the last row of Weapon Levels) and lowers it by one for each plane lost.
Any Object$weaponLevel < (dataCount('Weapon Levels') - 1)- Variable
$weaponLevel- Operator
+=- Value
1
$weaponLevel > 0- Variable
$weaponLevel- Operator
-=- Value
1
A.36 Kill Chain
Built in Chapter 9, Kill Chain.
Each shoot-down moves $chainRow, the kill chain's row of the Kill Chain Multipliers table, to the next row (up to the last); chainSeconds after the last shoot-down it goes back to the first row.
Any Object$chainRow < (dataCount('Kill Chain Multipliers') - 1)- Variable
$chainRow- Operator
+=- Value
1
- Timer Name
"killChain"- Repeat Every (s)
@self.chainSeconds- Ring Once
Yes
- Variable
$chainRow- Value
0
A.37 Kill Chain Color
Built in Chapter 9, Kill Chain.
Colors this text by the kill chain: the scoreColor of the chain's row of the Kill Chain Multipliers table.
Any ObjectText / UI- Component Value
self.text.color- Value
data('Kill Chain Multipliers', $chainRow, 'scoreColor')
A.38 Focus
Built in Chapter 10, Focus.
Sets moveSpeed, the Fighter's steering speed, at the start of every step: focusSpeedFactor of normalSpeed if the Focus Command was held in the step before, normalSpeed otherwise.
Any Objectself.focusDataself.focusData.isFocusHeld == true- Scope
Shared- Object
self- Variable
moveSpeed- Value
@self.normalSpeed * @self.focusSpeedFactor
- Scope
Shared- Object
self- Variable
moveSpeed- Value
@self.normalSpeed
- Component Value
self.focusData.isFocusHeld- Value
false
- Component Value
self.focusData.isFocusHeld- Value
true
A.39 Show While Focusing
Built in Chapter 10, Focus.
Shows this Object only while the Focus Command is held.
Any Object- Alpha
0
- Alpha
0
A.40 Aim at Fighter (Function)
Built in Chapter 11, The Command Bomber.
Gives aimDegrees: the direction from the shooter toward the Fighter, at least minimumForwardMeters to the south, kept within aimConeDegrees of south (-90).
- Name
toFighterX- Value
0
- Name
toFighterY- Value
0
- Name
direction- Value
-90
- Action Name
fighterInSky- Object
fighter- Operator
>- Value
0
fighterInSky.value == true- Variable
toFighterX- Value
fighter.transform.position.x - shooter.transform.position.x
- Variable
toFighterY- Value
fighter.transform.position.y - shooter.transform.position.y
- Variable
toFighterX- Value
0
- Variable
toFighterY- Value
-minimumForwardMeters
toFighterY > (-minimumForwardMeters)- Variable
toFighterY- Value
-minimumForwardMeters
- Variable
direction- Value
radtodeg(atan2(toFighterY, toFighterX))
direction < (-90 - aimConeDegrees)- Variable
direction- Value
-90 - aimConeDegrees
direction > (-90 + aimConeDegrees)- Variable
direction- Value
-90 + aimConeDegrees
- Value
direction
A.41 Command Bomber Aimed Volleys
Built in Chapter 11, The Command Bomber.
Every aimedSeconds of the current phase, flashes a warning at the muzzles that will fire, then fires aimed tracers toward the Fighter aimedWarningSeconds later.
Any Object- Timer Name
"aimedWarning"
- Timer Name
"aimedVolley"
- Timer Name
"aimedWarning"- Repeat Every (s)
data('Command Bomber Phases', @self.phaseRow, 'aimedSeconds')- First Delay (s)
data('Command Bomber Phases', @self.phaseRow, 'aimedFirstSeconds')
- Name
aimedWarningParticles- Value
0
- Variable
aimedWarningParticles- Value
data('Command Bomber Phases', @self.phaseRow, 'aimedWarningParticles')
data('Command Bomber Phases', @self.phaseRow, 'aimedNose') == true- Particles
Enemy Gun Muzzle- Position Relative To
Coordinate- Coordinate
Nose Muzzle- Count
aimedWarningParticles- Z Index Offset
2
data('Command Bomber Phases', @self.phaseRow, 'aimedWings') == true- Particles
Enemy Gun Muzzle- Position Relative To
Coordinate- Coordinate
Port Muzzle- Count
aimedWarningParticles- Z Index Offset
2
- Particles
Enemy Gun Muzzle- Position Relative To
Coordinate- Coordinate
Starboard Muzzle- Count
aimedWarningParticles- Z Index Offset
2
- Timer Name
"aimedVolley"- Repeat Every (s)
data('Command Bomber Phases', @self.phaseRow, 'aimedWarningSeconds')- Ring Once
Yes
- Name
aimedFlashParticles- Value
0
- Variable
aimedFlashParticles- Value
data('Command Bomber Phases', @self.phaseRow, 'aimedFlashParticles')
- Sound
Enemy Guns
- Action Name
aim- shooter
self- fighter
@self.fighter- minimumForwardMeters
@self.minimumForwardMeters- aimConeDegrees
@self.aimConeDegrees
data('Command Bomber Phases', @self.phaseRow, 'aimedNose') == true- shooter
self- tracer
@self.tracer- muzzle
"Nose Muzzle"- tracerSpeed
@self.aimedTracerSpeed- flashParticles
aimedFlashParticles- direction
aim.value- flash
'Enemy Gun Muzzle'
data('Command Bomber Phases', @self.phaseRow, 'aimedWings') == true- shooter
self- tracer
@self.tracer- muzzle
"Port Muzzle"- tracerSpeed
@self.aimedTracerSpeed- flashParticles
aimedFlashParticles- direction
aim.value- flash
'Enemy Gun Muzzle'
- shooter
self- tracer
@self.tracer- muzzle
"Starboard Muzzle"- tracerSpeed
@self.aimedTracerSpeed- flashParticles
aimedFlashParticles- direction
aim.value- flash
'Enemy Gun Muzzle'
A.42 Command Bomber Arrival
Built in Chapter 11, The Command Bomber.
When the Command Bomber comes into view: shows its health bar, keeps the Fighter out of the top laneMeters of the view, and flies on with the camera once it is formationAboveMiddleMeters above the middle of the view.
Any Object- Name
distanceToFormation- Value
0
- Name
formationY- Value
0
- UI Group
"commandBomber"
- Variable
$bomberLaneMeters- Value
@self.laneMeters
- Variable
formationY- Value
$viewMiddleY + @self.formationAboveMiddleMeters
- Variable
distanceToFormation- Value
self.transform.position.y - formationY
- Timer Name
"formation"- Repeat Every (s)
distanceToFormation / $scrollSpeed- Ring Once
Yes
- Custom Event
phaseStarted
- Y Velocity
$scrollSpeed
A.43 Command Bomber Flak
Built in Chapter 11, The Command Bomber.
In phases with flak: every flakSeconds, a warning at the nose, then a fan of flakTracers tracers flakArcDegrees wide, centered on south, at flakSpeed.
Any Object- Timer Name
"flakWarning"
- Timer Name
"flakFan"
data('Command Bomber Phases', @self.phaseRow, 'flakTracers') > 0- Timer Name
"flakWarning"- Repeat Every (s)
data('Command Bomber Phases', @self.phaseRow, 'flakSeconds')- First Delay (s)
data('Command Bomber Phases', @self.phaseRow, 'flakFirstSeconds')
- Particles
Enemy Gun Muzzle- Position Relative To
Coordinate- Coordinate
Nose Muzzle- Count
data('Command Bomber Phases', @self.phaseRow, 'flakWarningParticles')- Z Index Offset
2
- Intensity
data('Command Bomber Phases', @self.phaseRow, 'flakWarningShake')- Seconds
@self.warningShakeSeconds
- Timer Name
"flakFan"- Repeat Every (s)
data('Command Bomber Phases', @self.phaseRow, 'flakWarningSeconds')- Ring Once
Yes
- Name
flakArcDegrees- Value
0
- Name
flakTracers- Value
0
- Name
fanStep- Value
0
- Name
firstAngle- Value
0
- Variable
flakTracers- Value
data('Command Bomber Phases', @self.phaseRow, 'flakTracers')
- Variable
flakArcDegrees- Value
data('Command Bomber Phases', @self.phaseRow, 'flakArcDegrees')
- Sound
Enemy Guns
- Particles
Enemy Gun Muzzle- Position Relative To
Coordinate- Coordinate
Nose Muzzle- Count
data('Command Bomber Phases', @self.phaseRow, 'flakFlashParticles')- Z Index Offset
2
- Variable
firstAngle- Value
-90
- Variable
fanStep- Value
0
flakTracers > 1- Variable
firstAngle- Operator
-=- Value
flakArcDegrees / 2
- Variable
fanStep- Value
flakArcDegrees / (flakTracers - 1)
flakTracerstimes- shooter
self- tracer
@self.tracer- muzzle
"Nose Muzzle"- tracerSpeed
data('Command Bomber Phases', @self.phaseRow, 'flakSpeed')- flashParticles
0- direction
firstAngle + fanStep * local.index- flash
'Enemy Gun Muzzle'
A.44 Command Bomber Guns
Built in Chapter 11, The Command Bomber.
Fires straight south from the wing muzzles (and the nose when its phase says so) every gunSeconds of the current phase.
Any Object- Timer Name
"bomberGuns"
- Timer Name
"bomberGuns"- Repeat Every (s)
data('Command Bomber Phases', @self.phaseRow, 'gunSeconds')- First Delay (s)
data('Command Bomber Phases', @self.phaseRow, 'gunFirstSeconds')
- Name
gunFlashParticles- Value
0
- Variable
gunFlashParticles- Value
data('Command Bomber Phases', @self.phaseRow, 'gunFlashParticles')
- Sound
Enemy Guns
- shooter
self- tracer
@self.tracer- muzzle
"Port Muzzle"- tracerSpeed
@self.tracerSpeed- flashParticles
gunFlashParticles- direction
-90- flash
'Enemy Gun Muzzle'
- shooter
self- tracer
@self.tracer- muzzle
"Starboard Muzzle"- tracerSpeed
@self.tracerSpeed- flashParticles
gunFlashParticles- direction
-90- flash
'Enemy Gun Muzzle'
data('Command Bomber Phases', @self.phaseRow, 'gunNose') == true- shooter
self- tracer
@self.tracer- muzzle
"Nose Muzzle"- tracerSpeed
@self.tracerSpeed- flashParticles
gunFlashParticles- direction
-90- flash
'Enemy Gun Muzzle'
A.45 Command Bomber Health
Built in Chapter 11, The Command Bomber.
Starts the Command Bomber at startingHealth; each time a phase's share of the health is used up (Meter Threshold Reached) it moves to the next row of Command Bomber Phases, and after the last it is shot down.
Any Objectself.commandBomberState- Component Value
self.commandBomberState.maxHealth- Value
@self.startingHealth
- Component Value
self.commandBomberState.maxHealth- Operator
*=- Value
data('Round Settings', $roundRow, 'commandBomberHealthScale')
- Component Value
self.commandBomberState.maxHealth- Value
round(self.commandBomberState.maxHealth)
- Component Value
self.commandBomberState.phaseRow- Value
0
- Name
newPhaseRow- Value
0
- Component Value
self.commandBomberState.phaseRow- Operator
+=- Value
1
- Variable
newPhaseRow- Value
self.commandBomberState.phaseRow
- Custom Event
phaseStarted
- Intensity
data('Command Bomber Phases', newPhaseRow, 'startShake')- Seconds
data('Command Bomber Phases', newPhaseRow, 'startShakeSeconds')
- Particles
Flak Burst- Count
data('Command Bomber Phases', newPhaseRow, 'startFlakParticles')- Z Index Offset
2
data('Command Bomber Phases', newPhaseRow, 'dropsWingCannons') == true- Object to Create
@self.wingCannons- Position Relative To
Self
newPhaseRow == (dataCount('Command Bomber Phases') - 1)- Event
On Meter Threshold Reached · Meter With Thresholds Data.meter- Mode
Shot Down
- Custom Event
commandBomberShotDown
- Sound
Plane Break
- Intensity
@self.shotDownShake- Seconds
@self.shotDownShakeSeconds
- Particles
Plane Explosion- Count
@self.shotDownParticles- Z Index Offset
2
- UI Group
"commandBomber"- Visible
No
- Variable
$bomberLaneMeters- Value
0
A.46 Command Bomber Hits
Built in Chapter 11, The Command Bomber.
Each Fighter Tracer that hits adds one to the Command Bomber's damage (changeMeter), makes sparks, reports commandBomberHit, and flashes it white, settling on its current phase's tint.
Any Object- Custom Event
changeMeter
- Particles
Flak Burst- Count
@self.hitParticles- Z Index Offset
2
- Custom Event
commandBomberHit
- target
self- flashColor
@self.flashColor- flashSeconds
@self.flashSeconds- settleTint
data('Command Bomber Phases', @self.phaseRow, 'damageTint')
A.47 Flash on Hit (Function)
Built in Chapter 11, The Command Bomber.
Flashes the target's sprite flashColor for flashSeconds, then tints it settleTint.
- target
target- color
flashColor- mode
"solid"
- Seconds
flashSeconds
- target
target- color
settleTint- mode
"multiply"
A.48 Meter with Thresholds
Comes whole from Myth’s templates. Built in Chapter 11, The Command Bomber.
Keeps a meter between minimum and maximum, changes it by changeAmount each time it receives changeMeter, and runs Meter Threshold Reached once when the meter climbs to threshold (or Meter Threshold Lost when it falls back below it). meterField names the Data Structure field the meter is kept in, where other Logic can read it.
Any Objectself.meterWithThresholdsDataA.49 Show Command Bomber Health
Built in Chapter 11, The Command Bomber.
Shrinks this bar to the Command Bomber's share of health left each time it is hit.
Any Object- Name
healthLeft- Value
0
- Variable
healthLeft- Value
other.commandBomberState.maxHealth - other.commandBomberState.damage
- Horizontal Scale
healthLeft / other.commandBomberState.maxHealth
A.50 Round Sky Color
Built in Chapter 12, Rounds and Mission Complete.
Tints the sky for the current round, from the Round Settings table.
Any Object- Value
data('Round Settings', $roundRow, 'skyTint')
- Property
Mode- Value
"multiply"
- Property
Enabled- Value
true
- Alpha
data('Round Settings', $roundRow, 'skyAlpha')
A.51 Rounds
Built in Chapter 12, Rounds and Mission Complete.
When the Command Bomber is shot down: if rounds are left, waits breatherSeconds and flies the route again in the next round; after the last, the mission is complete. When a round is over it sends roundOver. Each round starts with no scenery moved ahead and the kill chain at x1.
Any Object- Action Name
stillPlaying- Game State
Playing
stillPlaying.value == true$roundRow < (dataCount('Round Settings') - 1)- Timer Name
"roundBreather"- Repeat Every (s)
@self.breatherSeconds- Ring Once
Yes
- Game State
Mission Complete
- Custom Event
roundOver
- Action Name
playingAfterBreather- Game State
Playing
playingAfterBreather.value == true- Variable
$roundRow- Operator
+=- Value
1
- Custom Event
roundOver
- Scene
Route- Transition
Fade- Transition Seconds
@self.fadeSeconds
- Variable
$furthestSceneryY- Value
0
- Variable
$chainRow- Value
0
- Action Name
isPlaying- Game State
Playing
isPlaying.value == true- UI Group
"flight"
- UI Group
"sky"
A.52 Show at Game State
Built in Chapter 12, Rounds and Mission Complete.
When the Game State becomes gameState, waits delaySeconds, then shows menu and pauses the world behind it.
Any Objectevent.current == @self.gameState- Timer Name
"showScreen"- Repeat Every (s)
@self.delaySeconds- Ring Once
Yes
- Menu Element
@self.menu
- Menu Element
@self.menu
