Out of curiosity, did you ever make maps for Age Of Empires II?
That had an event system which works the same way as Construct.
The basic gist is thus:
Selection Conditions
Construct has a list of conditions and actions (the event sheet editor). It scans this list from top to bottom, then scans it again, then again, and again, every time a new frame is drawn. The most basic condition is:
Always
This condition will trigger on EVERY pass of the events. So if we drew 100 boxes and did this:
Always
---Set X position of BOX to box.xpos + 1
...It would move the boxes to the right by 1 pixel on every frame.
In addition, Construct assumes by default that you mean ALL the boxes. So EVERY box will move.
If we want to set specific boxes to move, we have to narrow Construct's 'object focus' down using other conditions.
So we could do this:
X position of BOX > 320
---Set X position of BOX to box.xpos + 1
The condition basically says 'Is X position of BOX greater than 320 pixels?'
It scans EVERY box, literally asking it 'where are you?' and then it strikes off the list all boxes that don't match the criteria you gave it.
So when it comes to process the action, only the objects with an X position of 320px or more will move. You'll basically see the objects on the right-hand-side of the screen move, and the left will stay where they are.
You can enhance this further with more conditions:
X position of BOX > 320
Private Variable 'Health' > 20
---Set X position of BOX to box.xpos + 1
This narrows its selection down, first selecting only those on the right-hand side of the screen.
Then, OF THOSE OBJECTS STILL SELECTED, it checks whether their health is greater than 20.
So now when it processes the action, it only moves the ones on the right that have a health value of 20 or more. Weaker boxes, even though they're on the right, will not move.
This concept is ultimately like using a database. I don't know if you've used databases much, but it's a bit like having a list of names and saying
"Select all names, where county is 'Surrey', town is 'Caterham', 'Street' is 'Beggars Green'"
It's that kind of thing, but with objects.
This way, you can decide whether your code will apply to just one of many objects, or to a group of objects, or to all objects.
Trigger Conditions
These conditions are a teensy bit different. Normally, Construct just processes the event list from top to bottom, then does it again, then again, then again.
However, some conditions can be Triggered. These include:
'On Function' and 'On Start of Layout'
We can have an event like this:
On Function 'Move'
X position of BOX > 320
Private Variable 'Health' > 20
---Set X position of BOX to box.xpos + 1
And it will normally be skipped by Construct as it scans the list (because 'On Function "Move"' has not been triggered).
However, we can trigger it from inside another event by doing this action:
Run Function 'Move'
Then suddenly, it pauses everything and looks for all the events that start with 'On Function "Move"'. It will process them all, in the order they appear in the event list.
When it's done 'em all, Construct goes back to where it was and continues as normal.
So this way, you can run loops and functions and stuff from within other events, and they will be processed instantly.
That's basically how it all works. You use Trigger Conditions, to make sure something is only tested when you want it to be. And you use Selection conditions to narrow down which objects will be affected by this event. Then you define actions that will happen.