User:Polavux/Technical:Bloons Super Monkey 2 (Flash): Difference between revisions

From Blooncyclopedia, the independent Bloons knowledge base
Jump to navigation Jump to search
mNo edit summary
No edit summary
 
Line 1: Line 1:
==Level structure==
==Level structure==
===Behaviours===
{|class="wikitable"
{|class="wikitable"
!Character
!Character
Line 16: Line 14:
|}
|}


====AddBloon====
==Behaviours==
 
 
===AddBloon===
Spawns a single Bloon at the specified coordinates.
Spawns a single Bloon at the specified coordinates.
{|class="wikitable sortable"
{|class="wikitable sortable"
|+Parameters
!Index
!Index
!Description
!Description
Line 45: Line 47:
|}
|}


====AddBloonPolar====
===AddBloonPolar===
Unused. Spawns a single Bloon using [[wp:Polar coordinate system|polar coordinates]].
Unused. Spawns a single Bloon at the specified [[wp:Polar coordinate system|polar coordinates]].
{|class="wikitable sortable"
{|class="wikitable sortable"
|+Parameters
!Index
!Index
!Description
!Description
Line 69: Line 72:
|}
|}


====AddEmptyBloon====
===AddEmptyBloon===
Unused. Takes no parameters.
Unused. Takes no parameters.


====CreateCircle====
===AddShields===
Creates a group of Bloons in a filled ellipse.
Adds a [[Shielded Bloon (BSM2)|shield]] to each Bloon in the group. Does not affect child groups.
{|class="wikitable sortable"
|+Parameters
!Index
!Description
!Type
!Required?
|-
|0
|The health of the shield.
|Number
|{{y}}
|}
 
===CreateCircle===
Creates a group of Bloons in a solid ellipse.
{|class="wikitable sortable"
{|class="wikitable sortable"
|+Parameters
!Index
!Index
!Description
!Description
Line 106: Line 125:
|}
|}


====FollowBezier====
===CreateFromBitmap===
Generates a Bloon group from a <code>BitmapData</code> image asset. Starting with the top left pixel, it scans every third pixel from left to right, repeating for every third row of pixels, and for each pixel scanned, it creates a Bloon in the grid whose type depends on the pixel's colour. This behaviour is only used in the unused Altitude stages.
{|class="wikitable sortable"
|+Parameters
!Index
!Description
!Type
!Required?
|-
|0
|The name of the asset.
|String
|{{y}}
|}
 
This function maps the following colours to each Bloon type. If a colour does not map to a Bloon, it is treated as an empty space.
 
{|class="wikitable"
!Hex
!Type
|-
|<tt>#7B7B7B</tt>
|Lead
|-
|<tt>#FFFFFF</tt>
|White
|-
|<tt>#ED1C24</tt>
|Red
|-
|<tt>#000000</tt>
|Black
|-
|<tt>#620505</tt>
|Ceramic
|-
|<tt>#B5E61D</tt>
|Green
|-
|<tt>#FFF200</tt>
|Yellow
|-
|<tt>#00A2E8</tt>
|Blue
|}
 
===CreateRain===
Unused. Takes no parameters.
 
===FollowBezier===
Causes the group and all child groups to follow a [[wp:Bézier curve|cubic Bézier curve]].
Causes the group and all child groups to follow a [[wp:Bézier curve|cubic Bézier curve]].
{|class="wikitable sortable"
{|class="wikitable sortable"
|+Parameters
!Index
!Index
!Description
!Description
Line 165: Line 234:
|}
|}


====RemoveAtAge====
===RecordPath===
 
===RemoveAtAge===
Causes the group and all child groups to expire if the parent's age is greater than the specified lifespan.
Causes the group and all child groups to expire if the parent's age is greater than the specified lifespan.
{|class="wikitable sortable"
{|class="wikitable sortable"
|+Parameters
!Index
!Index
!Description
!Description
Line 179: Line 251:
|}
|}


====RemoveAtBottom====
===RemoveAtBottom===
Causes the group and all child groups to expire if the parent's Y-position minus its radius is greater than the height of the screen (600 pixels). This behaviour takes no parameters.
Causes the group and all child groups to expire if the parent's Y-position minus its radius is greater than the height of the screen (600 pixels). This behaviour takes no parameters.
===RemoveIfGreaterThanX===
===RemoveIfLessThanX===
===Repel===
===ReverseDrawOrder===
===Rock===
===Rotate===
===RotateAroundPoint===
===RotateSelectedTool===
===RotateWithVelocity===
===SaveFormation===
===SaveLevelsToSource===
===Scale===
===ScaleAroundPoint===
===ScaleOnX===
===ScaleOnY===
===ScaleSelectedTool===
===SelectAndGroup===
===SelectAndModify===
===SelectBackgroundAsset===
===SetPhase===
===SetPosition===
===SetTypeByBand===
===SetTypeBySector===
===SmoothMove===
===StartChild===
===StartFreshLevel===
===StartPaint===
===StayWhenEmpty===
===StunBehaviour===
===SuperUFOBehaviour===
===TakeSnapshot===
===TiltWithX===
===Trace===
Unused. Has no apparent functionality.
{|class="wikitable sortable"
|+Parameters
!Index
!Description
!Type
!Required?
|-
|0
|Internally named "value".
|Object
|{{y}}
|}
===UFOBehaviour===
===UndoAddBehaviour===
===UpdateFromFunction===
===UsePower===
===Wave===
===Wobble===

Latest revision as of 03:18, 15 March 2025

Level structure

[edit | edit source]
Character Function
i Executes the behaviour when the group is initialised.
u Executes the behaviour each time the group updates (normally happens on each frame, or 60 times per second).
x Executes the behaviour immediately. Normally used only for starting and ending child groups.

Behaviours

[edit | edit source]

AddBloon

[edit | edit source]

Spawns a single Bloon at the specified coordinates.

Parameters
Index Description Type Required?
0 The X coordinate. Number Yes
1 The Y coordinate. Number Yes
2 The type of Bloon according to its internal ID. Number Yes
3 If false, this Bloon and all Bloons created from child behaviours do not spawn Blops when popped. Defaults to true. Boolean No

AddBloonPolar

[edit | edit source]

Unused. Spawns a single Bloon at the specified polar coordinates.

Parameters
Index Description Type Required?
0 The angle, as represented by a number between 0 and 1, where 0=0°, 1=360°, and 0.5=180°. The value is multiplied by 2π to get the angle in radians. Number Yes
1 The distance. Number Yes
2 The type of Bloon according to its internal ID. Number Yes

AddEmptyBloon

[edit | edit source]

Unused. Takes no parameters.

AddShields

[edit | edit source]

Adds a shield to each Bloon in the group. Does not affect child groups.

Parameters
Index Description Type Required?
0 The health of the shield. Number Yes

CreateCircle

[edit | edit source]

Creates a group of Bloons in a solid ellipse.

Parameters
Index Description Type Required?
0 The spacing between each ring of Bloons within the shape. Number Yes
1 The radius. If set to 0, no Bloons generate. Number Yes
2 The type of Bloon according to its internal ID. Defaults to 0 (Red). Number No
3 Scales the ellipse on the X axis. Defaults to 1. Number No
4 Scales the ellipse on the Y axis. Defaults to 1. Number No

CreateFromBitmap

[edit | edit source]

Generates a Bloon group from a BitmapData image asset. Starting with the top left pixel, it scans every third pixel from left to right, repeating for every third row of pixels, and for each pixel scanned, it creates a Bloon in the grid whose type depends on the pixel's colour. This behaviour is only used in the unused Altitude stages.

Parameters
Index Description Type Required?
0 The name of the asset. String Yes

This function maps the following colours to each Bloon type. If a colour does not map to a Bloon, it is treated as an empty space.

Hex Type
#7B7B7B Lead
#FFFFFF White
#ED1C24 Red
#000000 Black
#620505 Ceramic
#B5E61D Green
#FFF200 Yellow
#00A2E8 Blue

CreateRain

[edit | edit source]

Unused. Takes no parameters.

FollowBezier

[edit | edit source]

Causes the group and all child groups to follow a cubic Bézier curve.

Parameters
Index Description Type Required?
0 The X position of point A. Number Yes
1 The Y position of point A. Number Yes
2 The X position of point B. Number Yes
3 The Y position of point B. Number Yes
4 The X position of point C. Number Yes
5 The Y position of point C. Number Yes
6 The X position of point D. Number Yes
7 The Y position of point D. Number Yes
8 If the quality is specified, this determines the speed. Otherwise, it determines the duration. Number Yes
9 Determines the "quality" of the curve. Defaults to 10000000. Number No

RecordPath

[edit | edit source]

RemoveAtAge

[edit | edit source]

Causes the group and all child groups to expire if the parent's age is greater than the specified lifespan.

Parameters
Index Description Type Required?
0 The lifespan, in frames. Number Yes

RemoveAtBottom

[edit | edit source]

Causes the group and all child groups to expire if the parent's Y-position minus its radius is greater than the height of the screen (600 pixels). This behaviour takes no parameters.

RemoveIfGreaterThanX

[edit | edit source]

RemoveIfLessThanX

[edit | edit source]

Repel

[edit | edit source]

ReverseDrawOrder

[edit | edit source]

Rotate

[edit | edit source]

RotateAroundPoint

[edit | edit source]

RotateSelectedTool

[edit | edit source]

RotateWithVelocity

[edit | edit source]

SaveFormation

[edit | edit source]

SaveLevelsToSource

[edit | edit source]

Scale

[edit | edit source]

ScaleAroundPoint

[edit | edit source]

ScaleOnX

[edit | edit source]

ScaleOnY

[edit | edit source]

ScaleSelectedTool

[edit | edit source]

SelectAndGroup

[edit | edit source]

SelectAndModify

[edit | edit source]

SelectBackgroundAsset

[edit | edit source]

SetPhase

[edit | edit source]

SetPosition

[edit | edit source]

SetTypeByBand

[edit | edit source]

SetTypeBySector

[edit | edit source]

SmoothMove

[edit | edit source]

StartChild

[edit | edit source]

StartFreshLevel

[edit | edit source]

StartPaint

[edit | edit source]

StayWhenEmpty

[edit | edit source]

StunBehaviour

[edit | edit source]

SuperUFOBehaviour

[edit | edit source]

TakeSnapshot

[edit | edit source]

TiltWithX

[edit | edit source]

Trace

[edit | edit source]

Unused. Has no apparent functionality.

Parameters
Index Description Type Required?
0 Internally named "value". Object Yes

UFOBehaviour

[edit | edit source]

UndoAddBehaviour

[edit | edit source]

UpdateFromFunction

[edit | edit source]

UsePower

[edit | edit source]

Wobble

[edit | edit source]