Eventing and You - Basic Default Events Guide

Poll

Did this guide help you?

Yes.
No.

Author Topic: Eventing and You - Basic Default Events Guide  (Read 5402 times)

A surprising amount of players don't know how to use a lot of the default events. They have multiple reasons. Some just didn't bother with eventing and only focused on building, whereas others just couldn't get it down.

This guide's aim is to help you understand how the default events work without getting to technical. I don't write guides very often, so please feel free to give criticism and feedback!

NOTICE:
When you see text like this, hover over the text with your cursor to see a tooltip.


Contents:

First off, here's the brick properties window.

Here we see "Brick Name, Light, Emitter and Emitter Dir., Item (Pos. Dir. and Respawn time), Raycasting, Collision, Rendering and 'copy' Checkboxes".
Firstly, copy checkboxes copy that line for properties or event lines. When you use the wrench on another brick, the copied lines will carry over to every other brick upon being checked.

  • Brick Name: The name of a brick. This is used for eventing, and allows event lines to change properties of this brick, or trigger events on this brick.
  • Light: The brick's light. Setting the light will provide light. Certain lights are brighter, darker and different colors.
  • Emitter: Sets what the brick emits. Emitters are images that are used as particles that do not collide with bricks, and are mainly used for decoration.
  • Emitter Dir(ection): The direction the emitter comes out of the brick.
  • Item: Sets what item the brick spawns.
  • Item Pos(ition): Sets what spot on the brick the item spawns.
  • Item Dir(ection): Sets what way the item is facing.
  • Item Respawn Time: How many seconds before the item respawns after being picked up.
  • Raycasting: Toggles raycasting. A brick's raycasting determines if a projectile can pass through it or not, or if the brick can be activated.
    On state: Projectiles collide with brick. Brick can be activated. Light flares cannot be seen through brick.
    Off state: Projectiles pass through brick. Brick cannot be activated. Light flares can be seen through brick.
  • Collision: Toggles collision. A brick's collision determines whether or not the brick can be passed through by players, vehicles and bots.
    On state: Players, vehicles and bots cannot pass through brick.
    Off state: Players, vehicles and bots can pass through brick.
  • Rendering: Toggles rendering. A brick's rendering determines if you can see through the brick or not, and if the brick emits light or not.
    On state: Brick can be seen, and gives off light.
    Off state: Brick cannot be seen, and doesn't give off light.

Here's the events window. (Ignore the VCE Client button, that's another story..)

So in the upper left corner, you see "Enable, Delay, Input Event, Target, Output Event and Output Parameters".

  • Enable is basically that, if that event line is enabled or not. If it's checked, the event will trigger, and if it's unchecked, it will not.
  • Delay is the amount of time before the event is triggered. It's measured by milliseconds. There are 1000 milliseconds in one second, and the limit is 30,000 milliseconds, or half a minute.
  • Input Event is how the event is triggered.
  • Target is what the event affects when triggered.
  • Output Event is what the event does when triggered.
  • Output Parameters are values that play part in what the event does when triggered.


INPUT EVENTS
Back to contents

  • onActivate: Triggered when the brick is clicked with the left mouse button.
  • onBlownUp: Triggered when the brick is blown up.
  • onBotTouch: Triggered when a bot touches the brick.
  • onDoorClose/Open: Triggered when the door brick closes or opens.
  • onKeyMatch: Triggered when a key of the same color as the brick is used on the brick.
  • onKeyMismatch: Triggered when a key of a different color is used on the brick.
  • onPlayerTouch: Triggered when a player touches the brick.
  • onPrintCountOverflow: Triggered when the print count of the brick goes over 9.
  • onPrintCountUnderflow: Triggered when the print count of the brick falls under 0.
  • onProjectileHit: Triggered when the brick is hit with a projectile. Has it's own output events named "Projectile"
  • onRelay: Triggered when the brick fires a relay.
  • onRespawn: Triggered when the brick respawns after being fakekilled.
  • onTeledoorEnter/Exit: When the teledoor brick is entered or exited.



TARGETS
Back to contents

  • Self: The target is the brick you're eventing.
  • Player: The target is the player that triggered the event.
  • Client: The target is your HUD.
  • Minigame: The target is the minigame the player is in.
  • <NAMED BRICK>: The target is a named brick.


With Output Parameters, sometimes you have to enter numbers in these three boxes to determine what direction something is cast, or shot.

If you do not understand what X, Y and Z means, refer to the Wikipedia page on the Cartesian coordinate system.



OUTPUT EVENTS FOR "SELF"
Back to contents

  • cancelEvents: Cancels any current events on the brick or named brick.
  • decrementPrintCount: Makes the printcount decrease by the value of the Output Parameters. Cannot go above 9.
  • disappear: Makes the brick disappear for an amount of time. The time is set in the Output Parameters, and is measured by seconds. If you put "-1" in the Output Parameters, the brick will disappear forever.
  • door: Allows you to customize what the door does. CCW = Counter Clockwise CW = Clockwise.
    toggle: clicking the door changes the property of the brick depending on what state it's in.
    open: opens the door.
    close: closes the door.
  • fakeKillBrick: The brick is 'killed', and will be shot in whatever direction, and remain fakekilled for an amount of time set by the Output Parameters.
  • fireRelay: The brick fires a relay.
  • fireRelay(Direction): Fires a relay in a direction. This means it makes bricks in that direction fire a relay.
  • incrementPrintCount: Same as decrementPrintCount, only makes the print count go up.
  • playSound: Plays a sound from the brick. Output Parameters decide what sound is played.
  • radiusImpulse: Shoots players in a defined direction. Output Parameters decide what direction, the radius and strength of the impulse.
  • recoverVehicle: Respawns the vehicle so long as no players are in the vehicle.
  • respawn: Respawns the brick.
  • respawnVehicle: Respawns the vehicle.
  • setColliding: Sets if the brick has collision or not.
  • setColor: Sets the color of the brick.
  • setColorFX: Sets the color effect of the brick.
  • setEmitter: Sets the emitter on the brick.
  • setEmitterDirection: Sets what direction the emitter is going to face.
  • setEventEnabled: Sets what event lines are enabled or disabled. The way this works is that you put the number of the event line in the box and check or uncheck the box.
  • setItem: Sets the item on the brick.
  • setItemDirection: Sets what direction the item is displayed.
  • setItemPosition: Sets what position the item is facing.
  • setLight: Sets the light of the brick.
  • setMusic: Sets the music of the brick.
  • setPrintCount: Sets the print count of the brick.
  • setRaycasting: Sets if the brick raycasts or not.
  • setRendering: Sets if the brick is visible or not.
  • setShapeFX: Sets the brick shape properties.
    none: the brick is normal.
    undulo: the brick is undulo, and starts wobbling like jello.
    water: the brick looks like a water brick.
  • setVehicle: Sets what vehicle the brick displays.
  • spawnExplosion: Spawns an explosion on the brick. Output Parameters decides how big the explosion is, and what the explosion is.
  • spawnItem: Drops an item from the brick. The different between setItem is that the item is affected by gravity. Output Parameters decides what direction the item is displayed, and what the item is.
  • spawnProjectile: Spawns a projectile from the brick. Output Parameters decides what the direction the projectile is fired, how big it is, how fast it goes in a direction and what the projectile is.
  • toggleEventEnabled: Toggles an amount of event lines to be enabled or disabled.
NOTICE:
"<NAMEDBRICK> Output Events are the same as "Self" Output Events.



OUTPUT EVENTS FOR "PLAYER"
Back to contents

  • AddHealth: Adds to the player's health. In the Output Parameters, if you put in a negative value, it will subtract that amount of health. The player's max health is 100, and you cannot exceed the maximum amount.
  • AddVelocity: Adds velocity to the player. Output Parameters decides what direction you're shot. Output Parameters decides which directions you are shot.
  • BurnPlayer: Burns the player for a duration. The duration in the Output Parameters are measured by seconds.
  • ChangeDataBlock: Changes the player's datablock.
  • ClearBurn: Clears the player's burn regardless of the duration.
  • ClearTools: Clears all of the player's tools.
  • Dismount: Dismounts the player from the vehicle the player is in.
  • InstantRespawn: Respawns the player instantly.
  • Kill: Straight up murders your face.
  • SetHealth: Sets your player's health.
  • SetPlayerScale: Sets how big your player is.
  • SetVelocity: Just like AddVelocity, only it instantly sets your velocity instead of adding it.
  • SpawnExplosion: Spawns on explosion on the player. Output Parameters decides how big the explosion is, and what the explosion is.
  • SpawnProjectile: Spawns a projectile from the player. Output Parameters decides what the direction the projectile is fired, how big it is, how fast it goes in a direction and what the projectile is.



OUTPUT EVENTS FOR "CLIENT"
Back to contents

  • BottomPrint: Displays a message at the bottom of the screen. The duration is measured in seconds, and the checkmark is for displaying a black border behind the text or not.
  • CenterPrint: Displays a message in the middle of the screen. The duration is measured in seconds.
  • ChatMessage: Displays a message in the chat box.
  • IncScore: Increases the player's score. In the Output Parameters, inputting a negative number subtracts that much from your score.
  • playSound: Plays a client-sided sound. This means only you can hear it.
NOTICE:
Print Messages can be customized by using codes. The list of codes is here.
tdn.garagegames.com/wiki/GUI/TorqueML



OUTPUT EVENTS FOR "MINIGAME"
Back to contents

  • BottomPrintAll: Displays a message on the bottom of the screen for everyone in the minigame. The duration is measured in seconds, and the checkmark is for displaying a black border behind the text or not.
  • CenterPrintAll: Displays a message in the center of the screen for everyone in the minigame. The duration is measured in seconds.
  • ChatMessageAll: Displays a message in the chat box for everyone in the minigame.
  • Reset: Resets the minigame.
  • RespawnAll: Respawns all the players in the minigame.

OUTPUT EVENTS FOR "PROJECTILE"
Back to contents

  • Bounce: The projectile bounces off of the brick. The scale determines how hard it bounces.
  • Delete: Deletes the projectile instantly.
  • Explode: Explodes the projectile. Instead of just deleting it, it will act as if the projectile normally collided with the surface.
  • Redirect: Redirects the projectile in an XYZ coordinate. The checkbox determines if it adds to the velocity of the bullet, or sets it.

I hope this guide helped you in any way. As I said, I would like criticism and feedback to improve the guide.
« Last Edit: November 22, 2012, 09:10:00 PM by IkeTheGeneric »

oh cool
thank you, sir

but guide needs expanding

  • onRelay: Triggered when the brick fires a relay.

You need to change this to "Triggered when the brick is hit by a relay."

Cools
But you need to explain the relays more, I think.

Cools
But you need to explain the relays more, I think.

Relays are really hard to explain, but I think I summed it up well. I'll work in it in a bit, though. Just let me think it out.


You need to change this to "Triggered when the brick is hit by a relay."

When a brick is "hit" with a relay, it fires a relay.

Title sounds like a self-help book, haha.

Anyways, nice job.

Title sounds like a self-help book, haha.

Anyways, nice job.

I was originally going to call it "Eventing for dummies", but that sounded too stupid.

When a brick is "hit" with a relay, it fires a relay.
If you want to go that deep detail you need to say it processes a relay

When a brick is "hit" with a relay, it fires a relay.

That doesn't seem to make sense. New players may get confused by this.

It would be easier for them to understand if the brick was "hit by a relay" instead of "fires a relay".

I was originally going to call it "Eventing for dummies", but that sounded too stupid.

Eventing for the intellectual pressed for time on a busy day.

'Eventing and you' is the most douchiest title i've seen today. Why can't it be something basic like 'Events guide' or something?

'Eventing and you' is the most douchiest title i've seen today. Why can't it be something basic like 'Events guide' or something?

I find it quite amusing.

'Eventing and you' is the most douchiest title i've seen today. Why can't it be something basic like 'Events guide' or something?

what

It looks like all you've written is a glossary, and in some cases your definitions raise even more questions for people not familiar with other common eventing terms.

Poll needs a "no, but that's because I already knew all this"