TGB/Behaviors
From TDN
Behaviors ListingWelcome! Here you will find user contributed behaviors that can be added to your games. Behaviors are available in all TGB versions since 1.5. To find out how to add your own behaviors to this listing, go here. |
Torque Game Builder (TGB) Behaviors |
AI |
Attach Path | Attach the object onto a path |
Face Object | Faces the object toward another object |
Face Object Left-To-Right | Flips the object left or right to face another object |
Move Toward Object | Moves the object toward another object |
Random Velocity | Sets a random velocity when the object is spawned |
Spawn Area | Continually spawns objects in the area of the object |
Spawn Area With Random Velocity | Continually spawns objects (with a random velocity when the object is spawned) in the area of the object |
Spawn On Remove | Spawns an object when the object is destroyed |
Timer Shoots | Shoots a projectile on a timer |
Turret | Shoots automatically at a target |
Audio |
AudioDescription | Creates an AudioDescription when the object is created. |
AudioProfile | Creates an AudioProfile when the object is created. |
MouseOverSound | Plays an audio profile on mouseEnter event. |
MouseClickSound | Plays an audio profile on mouseClick event. |
PlaySoundOnRemove | Plays an audio profile when an object is removed. |
PlaySoundOnCollision | Plays an audio profile on collision. |
Damage |
Deals Damage | Damages objects with the Takes Damage behavior on collision |
Takes Damage | Receives damage from the Deals Damage behavior on collision |
Takes Damage Advanced | Receives damage from the Deals Damage behavior on collision and updates scoreboard |
Effects |
Camera Mount | Mounts the camera to the currently selected object |
Camera Move | Moves the camera to an object's world limit when clicked |
Camera Follow | Camera follows an object with in another object |
Collision Particles | Plays a particle effect upon collision |
Contrail | Plays a particle effect only when its mounted parent is moving |
Fade Object | Adds fading ability to scene objects |
Parallax Object | Repositions an object based upon camera movement to simulate depth |
Scale Object | Adds ability to shrink or grow to an object |
Self Destruct | Destroys the object and plays an effect at a specified event |
Swap Image on Collision | Swaps the image of a sprite when it collides |
World Limit Particles | Plays a particle effect upon hitting the world limit |
Blink Out | Exists for only a short time before blinking and then disappearing |
Game Logic |
Count On Death | When the object dies, increments (or decrements) a counter (scoring, lives etc) |
Counter | Holds a count value, can be incremented or decremented and sets text to display value |
Clock | Rotates a clock hand 360 degrees over a specific period of time |
Fixed Position Health Bar | A health bar which can shrink towards top, bottom, left, or right edges, or shrink vertically or horizontally towards the center |
GUI |
Generic Button | Turns an object into a simple button |
GUI Container | Puts a TGE GUI inside of a SceneObject. |
Level Button | Loads a new level when clicked |
Mouse Over Grow | Scales the object when the mouse is hovering over it |
Mouse Over Cursor Change | Allows you to change the cursor when the mouse enters and leaves an object |
Object Overlay | Overlays an object on top of another object when the mouse is hovering over it |
SplashScreen | Turns an object into a splash screen |
Tool Tip | Renders a custom tool tip on an object when the mouse is hovering over it |
Score Board | Turns a text object into a scoreboard |
Input |
Generic Input Action | Adds a keybind for a specified function |
Shoots | Shoots a projectile |
Snap to Grid | Snaps an object to specified tilemap |
Behaviors Demo | Demonstrates all the behavior fields |
Joystick Input |
Align to Joystick | Rotates an object in the direction of a joystick axis |
Mouse Input |
Face Mouse | Faces the object toward the mouse |
Flee Mouse | Forces the object to avoid the mouse |
Follow Mouse | Moves the object to the position of the mouse |
Follow Mouse Ex | Moves the object toward the mouse, respecting physics |
Mouse Down Constant Force | Sets a constant force when the mouse is clicked |
Mouse Down Explode | Destroys the object when the mouse is clicked |
Mouse Draggable | Enables dragging of the object with the mouse |
Mouse Down Scale | Scales the object when the mouse is down |
Mouse Down Rotate | Rotates the object when the mouse is down |
Mouse Down Velocity | Sets a velocity on the object when the mouse is clicked |
Mouse Down Damage | Applies damage to an object when it is clicked |
Mouse Shoots | Left Mouse Button shoots (like shoots behavior) |
Movement Styles |
Asteroids | Adds controls similar to asteroids |
Platformer | Adds simple platformer style controls |
Shooter | Adds controls similar to shooter games |
SpaceShooter | Top down space shooter game similar to Geometry Wars |
Tank | Adds tank style controls |
Thruster | Adds thruster style controls |
Physics |
Damping | Sets the damping property on the object |
Rigid Body | Sets rigid body physics on the object |
Template | Disables the object unless it is a clone |
World Limit Wrap | Moves the object to the other side of its world limit |
RTS |
MousePointer | Used to make an object a mouse pointer to select other objects marked as selectable |
MakeSelectable | Marks the specific object as selectable. Can be multiselectable and needs a selection graphic |