Author Topic: Event system should be reworked.  (Read 2043 times)

WARNING: This idea would require changes to core game so no addon will do there. Also it is complicated (in implementation, not using it afterwards), so both I and you shouldn't expect it anytime soon (if at all)

That being clear, I think event system in Blockland should be overhauled.

For example On* events (OnRelay, OnPlayerTouch, etc.) should be able to take parameters. This way we could change OnRelay into OnMessage that takes string value as parameter and have SendMessage event that would take string parameter as well. Then OnMessage would react only in following cases:
- If string parameter of OnMessage is empty
- If string parameter of OnMessage matches one sent to it by SendMessage event.

This way we wouldn't need to make mods that adds things like "OnFireRelay2", "OnFireRelay3", etc., like this mod. Sure, it adds only one OnRelay-like event, but general mechanism is the same.

Also this change would make some mods, like VCE easier to use.

Which brings us to...

2. Build-in VCE-like solution. At least simple changing/adding/subtracting from variables and of course comparison. In my opinion such events should be part of core game, which would allow for better integration and easiness to use than third-party addon.

3. Change way named bricks dropdown list works. If there are lots of named brick groups, it is hard to find one you are looking for. Instead, it should do what some sites and filemanagers do - give text field and as you type show on much shorter list blocks that matches what you entered, shorter as you type. This is only item of the list that might be able to be changed by addon, although it may not be possible either without changes to core game.

I've been saying this for years and I've just been ignored :/

edit: Here, I'll just paste my original OP here.



This is not a suggestion for add-ons! This is a suggestion for Badspot to include in a future version of Blockland.

Input Event Parameters - By Truce

They'd open up tons of new modding opportunities and clean up the input event list by allowing a single event with a parameter to take the place of many events.

An example showing the changed Events GUI. Note the parameters on the left.


There hasn't been an update to the event system in a long time, and I think this is extremely needed.
« Last Edit: February 28, 2013, 10:31:11 PM by Greek2me »

I've been saying this for years and I've just been ignored :/
lol, it is the same for alot of the requests :P
--edit on your part
woah,

This doesn't have to be part of the core game, the original events were not.
All you need is a fancy gui and some many, many, special functions and your good to go!
« Last Edit: February 28, 2013, 10:34:48 PM by MARBLE MAN »

All you need is a fancy gui and some special functions and your good to go!

It's not quite that simple - look at the link to Truce's Input Event Parameters that I posted above.

It's not quite that simple - look at the link to Truce's Input Event Parameters that I posted above.
I was, and truces links to space guys post

It's not simple but I don't think it's extremely difficult either. I estimate that the server-side is only between 100-200 lines of code.

Too bad torque's gui system lacks a lot. I cant do anything cool because there's no draw polygon or shapes.

I was thinking of some sort of node based event system but of course that isnt really possible with the current state of gui

You could draw it using 1x1 swatch controls as pixels... lol I'm not sure how well that would work. But anyway this is off-topic.

You and me think alike, I thought the exact same thing! Except itd get sooo laggy

Somebody made a speedometer needle like that. Just one moving needle was laggy...



Anyway, I think that OP's suggestion needs to be default. How should we convince Badspot of this?

WARNING: This idea would require changes to core game so no addon will do there.
This actually isn't true.

Kalph is correct. If you look at my post up there, Truce actually made this.

The problem is that it needs to be a part of the default game so that everybody has it.

Well, on my part I'd opt for node-based system like one Scratch or Stencyl has. But I know it'd be too difficult to implement, so I didn't suggest it in OP. But would like that, should it ever happen.

why not even something like this; a "minimal" scripting language trying to be as friendly to non-tech savvy people as viably possible

Code: [Select]
constant speed = 200
 
on brick.activate
if not pending(brick.tick)
brick.change = repeat(speed, change, brick)
end
end
 
method change(brick)
brick.color = random.choice(server.colors)
end

Code: [Select]
on player.touch.start
    self.flash()
    client.centerprint("You were healed.")
 
    player.health = 100%
    player.overload_death = delay(5000, overload_death, player)
end
 
on player.touch.stop
    cancel(player.overload_death)
end
 
method overload_death(player)
    player.client.chat_message("You stood on the brick for too long.")
    player.kill()
end

Don't think that'll work port. Most people have a psychological block against any form of text based code/language. Even if the language had the exact same words and processing flow as the current events system, the average person would think "oh I don't know how to code, I won't be using events"