Author Topic: I need an event tutorial  (Read 1061 times)

I'm not sure if this is the right place but an advanced and basic tutorial about events would be appreciated greatly. If there is one please don't flame I used the search button.

Hello There Moose_Lover! Welcome to the blockland Forums. I See you've made your first post.


I Was planning on making Tutorials For blockland. How to make specific Add-ons and Such. When I Finish my Event Tutorials I Will try to tell you.

I am currently working on a Wrench Events toutorial, I will be sure to post a download to it in the help section.

Basic Events
Dissapearing Brick-OnActivate Self Dissapear(Here will be a 5, as in 5 seconds. Change it as you will.)
Dominos-OnActivate Self FAKEKillBrick  __ __ __,leave the __'s blank.-Say KillBrick, your brick dies. FakeKill unless you want it to only do it once.
Variables-I'm still working on it. But I can tell you Variables are often used for RPGs that do not have the CashMod or CityRP Mod.
Velocity-I never really made sure of the first two boxes, but there are three boxes. The last box is height, as in up and down. Say -Number to go down that much, and Number to go up that much. Other Boxes are NESW.
I hope I helped you atleast a little with the basics.

Here are the basics, but the best way to learn is to try them out for yourself.

On Activate:


On activate is a type of way to make events happen. (An Input event) Basically this makes it so once you click on the brick, the event will occur.

Dissapear:


Dissapear makes bricks invisible and walk throughable for a set time. the box with "5" already marked sets how long the brick will stay invisible. setting it to -1 makes it invisible forever, setting it to 0 makes it instantly visible.

The X, Y, and Z axis':

For some of the events to work, you must understand a 3d coordinate graph. (Or just figure out that they are directions, either way.) No matter what, Z (The 3rd box) will always go up and down. Use negative values to go down, and positive values to go up. The X and Y vales go left and right, forward and back. (X is the first box Y is the second.)

Spawn Projectile:

Spawn projectile will make a bullet shoot out of the brick! Select what kind of projectile you want it to shoot, then use the 3 boxes on the left to choose it's direction and how fast it goes. If you want the bullets to have some variation in accuracy, use the boxes on the right to set how much of a difference you want there to be. (Note: I'm not sure what the difference between positive and negative values in these boxes is.)

Set Velocity:

You can use set velocity to make players shoot in a direction! Set the direction you want them to go using the boxes, and then it should work. Similar to spawn projectile.

On Player Touch:


Similar to on activate, this is an input event. When a player touches the brick, the event will happen.

Relays:


Relays can be confusing. However, once you get the hang of it they are easy. Relays are used mainly for repeating things. The easiest kind of relay to make would be

Code: [Select]
on activate: self: fire relay
On relay: self: fire relay
On relay: self: event

However, with fire relay east west north south up and down you can make fancy emitter designs and other things as well. Try things out!

On Relay:


On relay is another Input event. Basically, once the brick is "hit" by a relay, this allows the brick to decide what it should do. (So, on relay: self: set color red would make the brick red!)

Set Color:

This event is self explanatory, it sets the color of a brick.

Set Event Enabled:

Set event enabled Allows you to turn on and off events on the brick! Those numbers on the left indicate which event an event is, and the box next to the numbers show whether the event is enabled or disabled through the use of a check mark. To enable/disable an event, use setevent enabled: then put in the number you want to change (of you have more than one then seperate them by commas) and check the box on the far right on or off to choose enabled or disabled.

Obviously these are not ALL the events, but this should be enough to get you started. Once you get the hang of the event GUI it's pretty easy to learn the other events on your own, so long as you know their purpose.