Author Topic: If statements  (Read 843 times)

If possible, I would really like if an if statement was made possible in future versions of Blockland. I believe that it could highly increase the potential from these events.
I've added a short and crappy example.

If you agree/disagree post here and why.

What you need to do is use creative use of turning on and off events.

Oh god yes. That would open up hundreds of new things you could do.

Also, I think there should be a "always" input event that does the event over and over as long as it is enabled.(delay would be how much time between events)

You can do this by repeatedly sending a relay or projectile at a brick, but its ineffective and stops you from using relays or projectiles for other stuff in that brick.


Speaking of relays, what about named relays? I.e when Relay A hits the brick, stuff happens, but when Relay B hits the brick, other kinds of stuff happens.



At laremere, of course, but can you check what someone wrote on print bricks with turning on and off events? Can you see what number a counter is on?

Here is your if then statement. The statement I made is "If a projectile hits switch1 while a player is standing on switch2, brick rocket will fire a rocket".


I wish it would Specify what the loving Boxes mean. You can get it after experimentation, but it's still quite frustrating.

Also, I think there should be a "always" input event that does the event over and over as long as it is enabled.(delay would be how much time between events)
I already have something like this for something I made
onActivate -> Self -> fireRelay
onRelay -> Self -> fireRelay
onRelay -> do something

@ Wedge, while that may be an alternative, there is still no way of calling out a function if a certain brick is painted a certain color or a certain number is on the scoreboard.

Those aren't valid inputs. The question was can you make if/then statements, not can you add oncoloractivate or onnumberactiave inputs.

You should be able to do these with mods. If no one else figures out how to do it before then, when Trader's doors come out you'll be able to look through his custom events and make new ones.

Ah I get it now, I also see that if statements would make everything else rather redundant.
Sadly I can't code so hopefully someone else will find interest in creating more events.
Thanks for the help.