Capturing Motion and door multisensor sequence to turn a light on based on direction of travel?

The solution here is using a variable in webCoRE

Piston Setup:

X^2 Define Variable

motion1first (Boolean)<----This will give you a quick and easy way of saying which one was triggered first

"Variable Section"
If
Motion 1 changes to Active
And
Motion 2 is Inactive
Then
Using Variable motion1first=True

If
Motion 2 changes to Active
And
Motion 1 is Inactive
Then
Using Variable motion1first=False

If
Any of Motion 1 or motion 2 changes
And
All of Motion 1 and Motion 2 are inactive
Then
Using Variable motion1first=false

"Action Section"
If
Any of Motion 1 or Motion 2 changes
And
All of Motion 1 and Motion 2 are Active
And
Variable motion1first is True
Then
Do whatever when coming from Motion 1 direction

If
Any of Motion 1 or Motion 2 changes
And
All of Motion 1 and Motion 2 are Active
And
Variable motion1first is False
Then
Do whatever when coming from Motion 2 direction