-
Notifications
You must be signed in to change notification settings - Fork 0
Blockly
CodeSpells makes use of Google's block-based coding language called Blockly. The blocks represent pieces of Javascript.

Main page: Control Blocks
These blocks manage the flow of control in a spell.
| On Create | What happens at the point of the orb's creation. |
| On Activate | What happens when the activate button is hit. |
| Call Function | Call a function with a delay before the call. |
| Repeat Function | Repeat a function with a delay between calls. |
| Destroy Orb | Destroys the orb. |
Main page: Orb Movement Blocks
Movement of the orb is controlled here, from the orb's speed to whether or not the orb should orbit around the player.
| [Set Orb Speed] | Choose how fast the orb moves. |
| [Orbit Player] | Make the orb circle around the player. |
| [Orbit Creator] | Make the orb circle around the spell caster |
| [Break Orbit] | Make the orb stop circling around something. |
| [Lock Orb to Player Rotation] | Makes the orb stay in the player's viewpoint. |
| [Unlock Orb to Player Rotation] | Frees the orb from the player's viewpoint. |
| [Turn Orb] | Turns the orb by the given amount. |
| [Set Orb Rotation] | Make the orb face a certain direction. |
| [Look At] | Make the orb face the player or spell create. |
Main page: Orb Properties Blocks
The blocks here mostly fetch data on the orb.
| [Lifetime] | The time since the spell started. |
| [Orb Distance to Player] | How far the orb is from the player. |
| [Remaining Mana] | How much mana the orb has left. |
| [Set Orb Color] | Change the color of the orb. |
Main page: Orb Powers Blocks
Elemental orb power blocks are located here.
Main page: OnHit Blocks
These blocks deal with the orb colliding with other objects.
| [OnHit] | What happens when the orb hits something. |
| [Is Hit Object Moveable?] | Can the object hit by the orb move? |
Main page: Communication Blocks
Certain interactions between orbs can be done with these blocks, allowing communication between spells.
Main page: Logic Blocks
Blocks that are used for if conditions and boolean values are of this type.
Main page: Loops Blocks
These blocks allow for creating loops of repeating code.
Main page: Math Blocks
Various number and math options, from random numbers to pi, are possible with these blocks.
Main page: Debug Blocks
These blocks allow for writing Javascript code into your spells by hand.
Main page: Variables Blocks
The blocks here are for creating and using variables within a spell.
Main page: Functions Blocks
With these blocks, you can create separate functions.