Events Tutorial

Author Topic: Events Tutorial  (Read 6297 times)

Welcome to Orion's/Aidan's Event Tutorial
We Give you 10 steps on how to begin Eventing!


1st, We will talk about spawning a projectile.
This is probaly the most easiest step, exept for simpily spawning an emitter or setting a color. You can use the
Code: [Select]
[On Activate/PlayerTouch] - [Self] - [SpawnProjectile] - [   ][   ][   ][ProjectileName][   ][   ][   ]. Each [   ] designates a direction, the last [   ] of the first three is usually up, and you can say, [100] to make it go up VERY powerfully, [5] to make it go very weak, and [-###] to make it go, the opposite direction (Down) They work for all of them, The higher the number, the farther it goes before either turning back down or dissappearing The - (Negative) Makes it go the Opposite direction as shown above. It is easier if you write down the [   ] codes as in (Second Box, West) or so on and so forth.

2nd, We will talk about RELAYS
This is a very basic step, and VERY easy, but easily spammed, Prepare for lag if you relay a projectile spawn or a explosion spawn. You will always need to do this:
Code: [Select]
[On Activate/PlayerTouch] - [Self] - [Firerelay]
[On Relay] - [Self] - [FireRelay]
Then do an On Relay and what you want it to repeat after the relay. Dont abuse this one! you may get banned!

3rd, We will talk about the easiest step, Setting Colors or Emitters.
This is the easiest one because it only requires one event! How easy! Use such as:
Code: [Select]
[On Activate/PlayerTouch] - [Self] - [SetEmitter/Color] - [Your Choice] so it can easily change it's color on a touch or click. or an emitter even.

4th, We will talk about Delay
Delay is VERY crucial in eventing, and eventing would fail without it, When you use a delay, IS when you trigger a brick it designates the time [In milliseconds] before it is truly activated, Such as
Code: [Select]
[[b]2000[/b]][On Activate/PlayerTouch] - [So on and so forth.] When you say the 2000 (which is the delay) it would take 2 seconds before the event happens. Seconds are counted by 1000, and only go up to 30 seconds unless you go deep into eventing which i will not explain here.

5th, we will talk about TOGGLE EVENT ENABLED
Here is where it gets exiting, when you make a trigger in one brick. Enable/Disable is crucial for this task. I give a simple Light On/On event. when you click the bulb, it lights up, plays a sound, changes color, and sets to glow, Then it goes back to normal, dark gray, and light off sound, and no glow, Here is how it works:
Code: [Select]
[0][On Activate][Disabled] - [Self] - [SetLight] - [PlayerLight]
[1][On Activate][Disabled] - [Self] - [Playsound] - [LightOn]
[2][On Activate][Disabled] - [Self] - [SetColor] - [White]
[3][On Activate][Disabled] - [Self] - [SetColorFX] - [Glow]
[4][On Activate][Enabled] - [Self] - [ToggleEventEnabled] - [1 2 3 5 6 7]
[5][On Activate][Enabled] - [Self] - [SetLight] - [None]
[6][On Activate][Enabled] - [Self] - [Playsound] - [LightOff]
[7][On Activate][Enabled] - [Self] - [SetColor] - [Black]
[8][On Activate][Enabled] - [Self] - [SetColorFX] - [None]
Toggle Event Enabled is used when you want to switch an event that is enabled when you click it, and when you click it again, something different happens, You can use this multiple times so you have to click the brick multiple times before the REAL event happens, such as
Code: [Select]
[0][On Activate][Enabled] - [Self] - [Toggle Event Enabled] - [0 1] Then to 1 2, 2 3, 3 4, and so on and so forth.

6th, VARIABLES! YAY!
Get me a server up and i will teach you there, it's too hard to explain, tell me in PM when it will be up, and when you want me to come, wait for me to reply, otherwise i might have not gotten the message.

7th, Bots
This is where it gets REALLY hard, if you wanted to make a horse turn into a bot, [Horse is the only "Bot" that comes with blockland] you would do:
Code: [Select]
[ON BOT TOUCH] - [Bot] - [Change Datablock] - [Standard Player] as you would see, make this on a vehicle spawn and spawn a horse on the vehicle spawn, it should turn into a bot if the event is on the plate, If you want it to move, Refer to the Velocity section but instead of [On Player Touch/Activate] it will be on bot touch. You can change the bot's chest by enabling Change Color on the pad or whatever it was so the vehicle changed color depending on the color of the plate, when this is turned on, color the plate the color you want it's shirt to be, then respawn the vehicle, if you want it to become pitch white, disable rendering on the vehicle spawn, then hit send.

8th, Add Velocity (Impulse)
Refer to the Projectile Section, but it dosent shoot projectiles, its shoots you in the direction :)

9th, Disappearing/Respawning
This is one of my favorite steps, Okay, name your brick Brick1 or any name,  and then do this:
Code: [Select]
[OnActivate] - [Self] - [Disappear][#] (The # is how long, in seconds, 1 is one second, 2 is two, and so on, -1 is forever.)then on your second brick, the one where you want to make it respawn, Do this:
Code: [Select]
[On Activate] - [(yourbrickname] - [Disappear][0] the 0 cmd in the disappear box will make it respawn, because it dissappears for 0 seconds.

10th, Rainbow Bricks/Vehicles
This is used using Relays, but i will give you the code directly:
Code: [Select]
[000][OnActivate] – [Self] – [FireRelay]
[600][OnRelay] – [Self] – [FireRelay]
[000][OnRelay] – [Self] – [SetColor][Red]
[100][OnRelay] – [Self] – [SetColor][Orange]
[200][OnRelay] – [Self] – [SetColor][Yellow]
[300][OnRelay] – [Self] – [SetColor][Green]
[400][OnRelay] – [Self] – [SetColor][Blue]
[500][OnRelay] – [Self] – [SetColor][Purple]
Remember, when you want to make it a rainbow VEHICLE, you need to enable the Set Vehicle Color Node thingymajig that the vehicle is colored what the brick color is, so when the brick changes color to the rainbows, the vehicle changes too.

We hope you find great use from this Guide! Thank you. If you need any more help with an event i forgot to post, i will add it, just PM. Thank you, Have a good time with your new skills in eventing!

Just remember, Once you learn to do these things, you can discover, and learn new things, once you know how to use delays, and dissappears, you can make new things happen

Theres a whole new world out there, With eventing. Please take this guide in seriousness and dont spam handicapped posts, otherwise i will lock and we wont get any more ideas. or new lessons. Thanks!

Wrong section,but looks good.

Wewps, was this asking for help or giving help? cause i in teh giving help section

You should of put this in General Discussion.

As long as i dont get banned for posting the same post in general discussion, AND help, make sure that isn't a rule, then tell me, im just trying to fit in into the community :(
 :panda:

Sorry for double post, monkeys stole my edit button, but this looks like the correct forum for this post.

The slider in spawnProjectile determines the scale of the projectile from one fifth (0.2) to double (2).

The second 3-vector (set of boxes) in spawnProjectile determines inaccuracy or random variation in each direction, not just the general direction it will fire in.

Player->spawnProjectile doesn't have the first 3-vector, it just has a 'speed' one - the projectile is aimed to go where you are looking.

I have no idea what that meant, my way is much more simple.

You just figure out the way, write it down, and you can copy it easily
Usually countd by north east south west.

The slider in spawnProjectile determines the scale of the projectile from one fifth (0.2) to double (2).
- You haven't actually mentioned this

The second 3-vector (set of boxes) in spawnProjectile determines inaccuracy or random variation in each direction, not just the general direction it will fire in.
- You haven't actually mentioned this

Player->spawnProjectile doesn't have the first 3-vector, it just has a 'speed' one - the projectile is aimed to go where you are looking.
- You haven't actually mentioned this


Summarised in a way that's easier to understand.

the last [   ] of the first three is usually up

It's always up.


i REALY need help. if you know the events where you talk and something happens please PM me how to do that stuff. people won't tell me and i realy need it. please help.

i REALY need help. if you know the events where you talk and something happens please PM me how to do that stuff. people won't tell me and i realy need it. please help.
Nice bump.