Author Topic: Make Eventing Great Again (Probably releasing tomorrow)  (Read 5907 times)

You need to add Input Event Parameters! https://forum.blockland.us/index.php?topic=165786.0
Okay here's a dumb scripting question.
So I tried just packaging fxDtsBrick::processInputEvent(%brick,%event,%client) which seemed easy enough but forgot that doesn't really address things on a line by line basis. So here I am trying to completely rewrite the function. My only problem is that I can't seem to figure out how to get the object that triggered the event in the first place. For example if my input event was "onProjectileHit" then how can I find the projectile that hit the brick. It's not a member variable of the brick (I tried dumping it during the function) nor is it one of the arguments to the function. I've also traced the whole process and there's no function that returns it as far as I can see.

Edit:
Oh, it's literally $InputTarget_[<target name>]

Double edit:
Got my first input parameter event working:
« Last Edit: December 12, 2016, 02:04:22 AM by New Year »

How about this for the buttons.

As for changing colors how about having a color chooser on the right side of the events.

Would it be possible for the buttons to appear only if your cursor is over the event line, for cleanness?

The reason I'd adhere to having the indent/move positioned like that is because there isn't an actual correlation between up-down movement, which is systematical, and indentation, which is only for readability, so I think it's counter intuitive to make them appear as if they actually behave the same. Not to mention that the indentation icons should maybe be more than a mere arrow.
In that regard the indentation could also be made into a single button functioning with left/right mouse button, which would allow the fitting of all functions in the presumed 2x3 grid.

Otherwise a perhaps heretic suggestion, what if instead of moving events with buttons you could drag & drop them around.
« Last Edit: December 12, 2016, 08:06:07 AM by LeetZero »

Okay here's a dumb scripting question.
So I tried just packaging fxDtsBrick::processInputEvent(%brick,%event,%client) which seemed easy enough but forgot that doesn't really address things on a line by line basis. So here I am trying to completely rewrite the function. My only problem is that I can't seem to figure out how to get the object that triggered the event in the first place. For example if my input event was "onProjectileHit" then how can I find the projectile that hit the brick. It's not a member variable of the brick (I tried dumping it during the function) nor is it one of the arguments to the function. I've also traced the whole process and there's no function that returns it as far as I can see.

Edit:
Oh, it's literally $InputTarget_[<target name>]

Double edit:
Got my first input parameter event working:

can you make it so you can add more parameters separated with commas?

How about this for the buttons.

One core reason the copying wouldn't really work in that position is this:

It currently allows for multiline selection, then paste-ing that as a whole.
There is also the insert line function which performs a similar task. Allows you to quickly insert lots of editable lines after the gap:



As for changing colors how about having a color chooser on the right side of the events.
Yeah, that could work nicely. As a rebuttal, it is quite nice at the moment having the large area to be able to click. I could see using the small button a bit frustrating.
But here's how the colouring currently looks as a frame of reference:

One feature planned is to have it possible to select multiple lines using the select tool then, set the colour of all the selected lines on mass.


The reason I'd adhere to having the indent/move positioned like that is because there isn't an actual correlation between up-down movement, which is systematical, and indentation, which is only for readability, so I think it's counter intuitive to make them appear as if they actually behave the same.
I can get behind that logic.

Not to mention that the indentation icons should maybe be more than a mere arrow.
Hm. This is what I came across as a common "indent" button design


Working with the space we have, this is what I've got for an imitation


The issues arise when you realise how little space there really is. Not only is it tight when designing the buttons at full size but when the are scaled down for the UI, it becomes approximated and blurry:


Oh and by the way, here's an example of the buttons in use in the proposed layout:

And the original buttons for comparison:



In that regard, the indentation could also be made into a single button functioning with left/right mouse button, which would allow the fitting of all functions in the presumed 2x3 grid.
I think we talked about doing that for the colour selection mode and have it cycle backward and forwards, but Dren found that it wasn't able to recognise the difference between left and right clicks or something? Would be nice tho.

There will also be support for mass indenting. So if you select multiple lines, you can indent and outdent them all together.


Otherwise a perhaps heretic suggestion, what if instead of moving events with buttons you could drag & drop them around.
Not from my knowledge but hearing it from people like Dren and Zeb, I'm not sure that's even possible :c
It would be so great if you could


But yes, having any feedback about the different functions and UI is super useful and helpful!
It's far better to iron all those things out now rather than have complaints further down the line and attempt to rearrange it then, hence why the beta testers are super useful.

Drag and drop is definitely possible. Easy, maybe.

All you have to do is replace your background buttons with mouse event ctrl (so you get button down events) and create a fullscreen mouse event ctrl on click (to get drag events)

can you make it so you can add more parameters separated with commas?
At the moment there's only going to be one input parameter (maximum) per event. The types are string, list, datablock, and maybe paintcolor. I don't really have any space to put additional parameters, and many of the parameter types are redundant anyway.

I've tested it and it seems to work, now JamJar has it and he'll try and test it.
I'm going to make input parameters for most of the default events if possible. An input parameter left blank will be the same as its default functionality without any input parameter.
Drag and drop is definitely possible. Easy, maybe.

All you have to do is replace your background buttons with mouse event ctrl (so you get button down events) and create a fullscreen mouse event ctrl on click (to get drag events)
Dragging and dropping is possible, yes.
I don't know about easy.

to those outside of the US, glad you didn't have to deal with this election
we did

people wouldn't shut up about it here