Behaviors
Behaviors can be linked together to build sophisticated game mechanics and logic
Once triggers only one time, as soon as the game begins
Outputs
This behavior has a single output of 1 that gets triggered once
Always triggers on every game 'tick'
Outputs
This behavior has a single output of 1 that is always triggered
Properties
The skip frames knob can be adjusted so that this behavior only triggers every few frames
Timer a stopwatch you can use to delay or repeat actions
Inputs
Start starts the timer running. If nothing is connected here, timer will start automatically.
Reset stops the timer, and sets the repeated count back to zero.
Delay sets the timer delay to the value is passed in.
Delay is counted in 1/10 second increments, so if you input 20
then the timer will next trigger in two seconds.
Outputs
Timers have a single output of 1, which is triggered each time the delay setting is reached
Properties
Delay is the same as the delay input.
Repeat Forever tells the timer to start running again each time it triggers.
Repeat Count sets how many times the timer will trigger.
Mouse Click triggers when a player clicks the mouse
Outputs
This behavior has four outputs that emit 1
Down is triggered when the mouse button is pressed.
Up is triggered when the mouse button is released.
Over is triggered when the mouse pointer rolls over an object.
Out is triggered when the mouse pointer rolls off of an object
Properties
Capture Clicks Anywhere tells the behavior to trigger when the mouse is clicked anywhere in the game, instead of just on the object.
Mouse Move triggers when a player moves the mouse pointer
Outputs
X outputs the mouse position on X axis, relative to object.
Y outputs the mouse position on Y axis, also relative to object.
Keyboard triggers when a player presses the key
Outputs
This behavior has two outputs that emit 1
Down is triggered when the assigned key is pressed.
Up is triggered when the assigned key is released.
Properties
Change Key button allows you to choose a key that will trigger this behavior. Click the "Change Key" button, and then just press the desired key. The "current key" label displays the currently assigned key.
Repeating tells the behavior to continue to trigger as long as the assigned key is held down. Tweaking the "repeat delay" knob allows you to tune how quickly the trigger fires when the key is held.
Collision triggers when the object touches another object.
Outputs
Hit emits 1 when the object touches another object that has collisions enabled.
Properties
Select Type allows you to choose a the type of object that will trigger this behavior.
Select Object enables you to limit the trigger to only fire when a specific object is collided with. Selecting "Any Object" means that the trigger will fire when colliding with any object of the selected type.
Top, Bottom, Left, Right - these settings enable the collisions to trigger only for specific directions. For instance, enabling only "top" means that the trigger will only fire when this object's top comes in contact with a selected object.
Proximity triggers when the object gets close to another object.
Outputs
Out emits 1 when the object comes within range of a specified object.
Properties
Select Type allows you to choose a the type of object that will trigger this behavior.
Select Object enables you to limit the trigger to only fire when a specific object of the selected type is near. Selecting "Any Object" means that the trigger will fire when coming in range of any object of the selected type.
Trigger Distance how close the two objects can get before the behavior is triggered.
Only Trigger Once select this to make sure that trigger fires once when the objects get close. Otherwise the trigger will continue to fire as long as the objects are within range of each other.
Mailbox triggers when the object recieves a message. (see message)
Outputs
Out triggers when the selected message comes in. The value sent with message is emitted.
Properties
Message is the message that will trigger this behavior.
Number contains an integer value.
Inputs
Set sets value to the input value, no output is triggered.
In outputs the current value.
+ adds input to the current value.
Outputs
Out current value is emitted when an input is recieved.
Properties
Label is an optional helpful label that is displayed on the behavior, it will not affect behavior and is only to aid organization.
Current Value is used to manually set the value of this behavior
Expression is an arithmetic expression.
Inputs
A sets value of "A" to the input value, no output is triggered.
B sets value of "B" to the input value, no output is triggered.
Eval evaluates the expression, and sends the results to output.
Outputs
Out value of expression is emitted when an input to eval is recieved. This value can be linked back to the A or B inputs if desired.
Properties
Label is an optional helpful label that is displayed on the behavior, it will not affect behavior and is only to aid organization. Example labels could be "Health" or "Fuel".
A is used to manually set the value of variable A
B is used to manually set the value of variable B
Expression is the expression to be evaluated.
10
, B is set to 1
,
and Expression is set to A+B
, then the output from eval would be
11
Ease smoothly transitions from one value to another.
Inputs
From assigns a new starting value.
To assigns a new ending value. Once both are assigned, then the easing begins.
Outputs
Out the current value between start and end.
Done the current value, sent when transition is complete.
Properties
Transition is the curve to use when transitioning between values
Duration is how long the transition takes.
Random generates a random number.
Inputs
new generates a new random number.
Outputs
Out emits the number generated.
Properties
Min Value is the smallest number that will be generated
Max Value is the largest number that will be generated
Filter filters input using a condition and value.
Inputs
in is the input to filter.
Outputs
Pass emits the input value is the filter passes.
Fail emits the input value is the filter fails.
Properties
Condition is the condition used to filter input.
Value is the value to filter against.
1
, then an input value of 1
would be
routed to the fail output, while an input value of 0
would be routed to
Pass.
Switch enables or disables the link between input and output.
Inputs
Off turns the switch off.
On turns the switch on.
In sends a value to output when the switch is on.
Outputs
Out emits the input value when switch is on.
Properties
On/Off is the starting value of the switch.
Toggle toggles between two outputs.
Inputs
Next selects the next output.
In sends a value to output one or output two.
Outputs
Out 1 emits the input value when toggled to this position.
Out 2 emits the input value when toggled to this position.
Properties
Loop causes the toggle to loop back to position after once it gets two position two. Otherwise the toggle will only switch once.
Start at is the starting position of toggle
Sound plays a sound effect.
Inputs
In plays a sound.
Outputs
Out emits the input value.
Properties
Sound is the sound effect to play.
Emitter creates and emits new objects.
Inputs
Emit creates and emits new object.
Outputs
Out outputs the input value.
Properties
Type is the type of object to emit.
Max Age how long the newly created object lasts before it is removed.
Force how much force is added to the new object.
Match Rotation matches the new object's rotation with this one.
Attacher creates and attaches a new object.
Inputs
On creates and attaches a new object.
Off removes the attached object.
Outputs
Out outputs the input value.
Properties
Type is the type of object to attach.
Match Rotation matches the new object's rotation with this one.
Motor makes object move by adding force over time.
Inputs
X add force on the X axis.
Y add force on the Y axis.
FWD add force in the forward direction.
Outputs
Out outputs the input value.
Impulse makes object move immediately by adding force instantly.
Inputs
X add impulse on the X axis.
Y add impulse on the Y axis.
FWD add impulse in the forward direction.
Outputs
Out outputs the input value.
Point At rotates object toward an x/y position.
Inputs
X axis position to point at.
Y axis position to point at.
Outputs
Rot outputs the object's new rotation in degrees.
Destroyer removes this object from the game.
Inputs
Destroy destroys this object, removing it from the game and stopping all its behaviors.
Outputs
Out outputs the input value.
Camera makes the camera view follow this object.
Outputs
Out outputs the value 1 when the view updates.
Properties
% how closely the background layer follows the foreground layer. At 100% they move together, but lowering this value makes the background move more slowly giving an effect of depth.
Left/Right whether the view can move left and right.
Up/Down whether the view can move up and down.
Min/Max the lower and upper limits to how far the view will move.
Message sends a message to another object. (see mailbox)
Inputs
Send send the message, along with the value sent to this input
Properties
Message message to send, any text will do.
Send To Last Contacted Object the message will go to the last object that was touched.
Send To Object allows you to send the message to a specific object by name, or to all objects of a specific type.
Position sets the object's x/y position
Inputs
X set the x position.
Y set the y position.
Outputs
X outputs the new x position.
Y outputs the new y position.
Properties
Pixels/Grid are the units to use. Pixels are the default, but grid coordinates can be used when preferred.
Rotation sets the object's rotation in degrees
Inputs
Set set the object's rotation directly.
Add add the input value to the object's current rotation.
Outputs
Out outputs the input value.
Alpha sets the object's transparency
Inputs
% visibility of object where 100% is fully opaque and 0% is completely transparent.
Outputs
Out outputs the new transparency.
Size sets the object's size
Inputs
% scale of object, where 100% is original size and 50% is half-sized.
Outputs
Out outputs the new size.
Enabled turns the object's behaviors on or off
Inputs
True enables the object's behaviors.
False disables the object's behaviors.
Outputs
Out outputs the input value.
Animation plays an animation
Inputs
Start start running the selected animation.
Stop stop running the selected animation.
Outputs
Play outputs the input value when the animation begins.
Stop outputs the input when the animation either completes, or is stopped.
Properties
Animation to play.
Loop after the last frame of animation, start back at the beginning.
Always Complete if another animation attempts starts while this one is running, complete this animation before beginning the next one.
Velocity how fast the object is moving.
Inputs
X set velocity on the X axis.
Y set velocity on the Y axis.
FWD set velocity in the forward direction.
Outputs
Out outputs the input velocity value.
Flip flip the object vertically or horizontally.
Inputs
Flip flips the object.
Back unflips the object.
Toggle if the object is flipped, unflip it and vice versa.
Outputs
Out outputs the input value.
Extractor fetch the value of an object's property without modifying it.
Inputs
Extract extracts the value.
Outputs
Value value of extracted property.
Properties
Property to extract.
Object to extract the property from.
Alert display a window with message and button.
Inputs
Show open the window.
Outputs
Click outputs the input value when player clicks the button, closing the window.
Properties
Title large title text.
Message smaller message text.
Button text on button.
Bar a simple progress bar.
Inputs
Value value to display in bar.
Outputs
Out the bar's new value.
Properties
Current Value the current value of the bar.
Max Value the bar's maximum value.
Label a text label.
Inputs
Value value to display in label.
Outputs
Out the label's new value.
Properties
Text to display in label.
Font for label.
Size of label.
Pause stop all game objects from moving.
Inputs
Pause pause the game.
Play resume the game.
Outputs
Out output the input value.
Next Level load and start playing a level.
Inputs
Go start playing new level.
Outputs
Out output the input value.
Properties
Select Level to play.
Restart Game restart game from beginning.
Inputs
Go start game again from beginning.
Outputs
Out output the input value.
Save save and load values.
Inputs
Save save the input value as name.
Outputs
Read read the input value from name.
Bundles create a reusable module of behavior logic
Create a new Bundle, then either drag existing behavior logic into it or open it and add behaviors directly. Bundles can be nested to create more sophisticted logic. Bundles are a great way to keep your game logic organized :)