Author Topic: [Tutorial] How to make a VCE Generator  (Read 2733 times)

Like in Isar Tower, someone was asking for help in general discussion for how to make one of these. So it took me 45 minutes to write but I wrote him a full tutorial on how to make it. Figured I might as well post it here so others can see.


Everything below this line is copy/pasted from my previous post in the other topic!


For the generator, make 2 blocks in an enclosed space. For this example, we'll use 1x2x5 bricks, broad side facing eachother. Looks like this:

O       O
O       O

"O" being brick studs.

Now lets name the ones on the left "Fire" (We'll make it green") and the other one "Receive" (yellow")

O       O
O       O

First, we'll apply the following events to "Fire", or the green brick.


0   ☑   [400]   OnRelay - Self - FireRelay
1   ☑   []   OnRelay - Self - SpawnProjectile [Pong] [X] [X] [X]*


*Mess around with the coordinates until they aim at "Receive". Only one coordinate should have a value, and it should take about a half of a second for it to hit it.

Projectile is optional, but I prefer pong.
Simple event, huh?
Make a separate brick of any type to start up the generator. I would prefer a JVS button, but the choice is up to you. Apply the following event:

0   ☑   []   OnActivate - NamedBrick [Fire] - FireRelay


Done. Now select the "receiver" brick and enter it's events. This one is a little bit harder. Add these:

0   ☑   []   OnProjectileHit - Self - FireRelay
1   ☑   []   OnRelay - Self - VCEModVariable [Ingots] [Add] [3]
2   ☑   []   OnProjectileHit - Projectile - Delete


For this example our variable is called "Ingots". Our generator is done! We'll test it later, now on to our power user!

We'll use a lamp for this example. Build your lamp, and enter the wrench menu for the brick you want the light on. Enter events. Apply the following:

0   ☑   []   OnActivate - Self - FireRelay
1   ☐   [5000]   OnRelay - Self - FireRelay
2   ☑   []   OnRelay - Self - VCEIfVariable [<var:nb_receive:Ingots>] [>=] [3] [3 4]
3   ☑   []   OnVariableTrue - Self - SetLight [Player's Light]
4   ☑   []   OnVariableFalse - Self - SetLight [None]
5   ☑   []   OnVariableTrue - NamedBrick [Recieve] VCEModVariable [Ingots] [Subtract] [3]
6   ☑   []   OnVariableTrue - Self - VCEModVariable [lamp1power] [Set] [1]
7   ☑   []   OnVariableFalse - Self - VCEModVariable [lamp1power] [Set] 0
8   ☑   []   OnActivate - Self - VCEIfVariable [lamp1power] =/= 0 [9 9]
9   ☑   []   OnVariableFalse - Client - Bottomprint [The generator does not have enough power do supply this object!]



NEW: EXTRA

Checker

Want to check the number of ingots?
Make a brick (preferably a print ramp with a computer image) and event the following:


0   ☑   []   OnActivate - Client - Centerprint [The generator currently has <var:nb_receive:ingots> ingots stored!]


NEW: ANOTHER EXTRA

Manual Pump

Need power fast? Want to go green? This brick will add one ingot each time it is clicked for extra generation!
Make a brick (Do not use a JVS button that has to reload, use a regular brick!) and apply the following:

0   ☑   []   OnActivate - Self - VCEModVariable [<var:nb_receive:ingots> [Add] [1]
1   ☑   []   OnActivate - Client - Centerprint [Nice! You just manually generated an ingot!

Also, a note, whenever I use [ and ], I'm just using that to mark a box! Do not actually type them!

Isar tower doesn't look so amazing now...
now for someone to crack that data storage room and make an easy to follow tutorial.

Isar tower doesn't look so amazing now...
now for someone to crack that data storage room and make an easy to follow tutorial.
I have a save of it. Kind of an old save. I will NOT GIVE AWAY OR DISTRIBUTE. It's just for expanding my knowledge of events. I'll check out the storage room today.

Nice TUT but it would be easier with pictures  :cookieMonster: 

but again nice

Why does this need a tutorial?

isn't the concept of a generator common sense?

Why does this need a tutorial?

isn't the concept of a generator common sense?
pretty much, but people seem to lack it

Bump cause I put a lot of work into this c:

Got the generator good. But power user won't work. What is the =/= for. I only have ==. I put that and when its done it tells me I dont have enough power I even used the checker I have alot of power.

i think VCE uses != for notequals, not =/=

very nice,but I must correct you.

Code: [Select]
=/=isn't a notequal in VCE

Code: [Select]
!=is a notequal

Thats the only error I see.

oh thats the problem i've had all along. thx for the tutorial dude

God damnit. Cant edit :c

that's why people should stop making "tutorials" in help, they don't belong there really, as it's a place to ask for help
they should be going in general discussion, as it's about BL, informing something, and you can modify