First create three elements:
Element Clear tutorialelement1 255 0 0 0 1 1 1 0 Clear 100 File 1.BMP Element Clear tutorialelement2 0 255 0 0 1 1 1 0 Clear 100 File 2.BMP Element Clear tutorialelement3 0 0 255 0 1 1 1 0 Clear 100 File 3.BMP
Then bind these elements to an InteractionTrigger:
InteractionTrigger tutorialelement1 tutorialelement2 tutorialtrigger 100
Then create the tutorialtrigger:
ON tutorialtrigger DRAW ELEMENT:tutorialelement3 LINE X1 Y1 -10 -10 ON tutorialtrigger DRAW ELEMENT:tutorialelement3 LINE X1 Y1 10 -10 ON tutorialtrigger DRAW ELEMENT:tutorialelement3 LINE X1 Y1 -10 10 ON tutorialtrigger DRAW ELEMENT:tutorialelement3 LINE X1 Y1 10 10
This will draw an “X” at the position the 2 elements hit.
X1 is the X-Coordinate of the first element in the interaction.
Y1 is the Y-Coordinate of the first element in the interaction.
X2 is the X-Coordinate of the second element in the interaction.
Y2 is the Y-Coordinate of the second element in the interaction.
INTERACTION1 is the first element involved in the interaction.
INTERACTION2 is the second element involved in the interaction.
The final script:
Element Clear tutorialelement1 255 0 0 0 1 1 1 0 Clear 100 File 1.BMP Element Clear tutorialelement2 0 255 0 0 1 1 1 0 Clear 100 File 2.BMP Element Clear tutorialelement3 0 0 255 0 1 1 1 0 Clear 100 File 3.BMP InteractionTrigger tutorialelement1 tutorialelement2 tutorialtrigger 100 ON tutorialtrigger DRAW ELEMENT:tutorialelement3 LINE X1 Y1 -10 -10 ON tutorialtrigger DRAW ELEMENT:tutorialelement3 LINE X1 Y1 10 -10 ON tutorialtrigger DRAW ELEMENT:tutorialelement3 LINE X1 Y1 -10 10 ON tutorialtrigger DRAW ELEMENT:tutorialelement3 LINE X1 Y1 10 10
1. Element Clear tutorialelement 255 255 255 0 1 1 1 0 Clear 100 File 1.BMP 2. InteractionTrigger tutorialelement Earth tutorialtrigger 10000 3. REMOVETRIGGER tutorialtrigger 4. ON tutorialtrigger DRAW ELEMENT:tutorialelement FILL X2 Y2
1. Element Clear tutorialelement 255 0 0 0 1 1 1 0 Clear 100 File 1.BMP 2. InteractionTrigger tutorialelement All tutorialtrigger 100 tutorialelement 3. REMOVETRIGGER tutorialtrigger 3. ON tutorialtrigger IF (X2 > X1) tutorialtrigger2 3. REMOVETRIGGER tutorialtrigger2 4. ON tutorialtrigger2 DRAW INTERACTION1 POINT X2 Y2 5. ON tutorialtrigger2 DRAW INTERACTION2 POINT X1 Y1
1. Element Clear tutorialelement 255 0 0 0 1 1 1 0 Clear 100 File 1.BMP 2. InteractionTrigger tutorialelement All tutorialtrigger 100 tutorialelement 3. REMOVETRIGGER tutorialtrigger 3. ON tutorialtrigger DRAW ELEMENT:Earth RECT (X1 - 5) (Y1 - 5) 10 10 4. ON tutorialtrigger DRAW ELEMENT:Clear POINT X1 Y1
1. Element Clear tutorialelement 255 0 0 0 1 1 1 0 Clear 100 File 1.BMP 2. InteractionTrigger tutorialelement Clear tutorialtrigger 10000 tutorialtrigger 3. REMOVETRIGGER tutorialtrigger 4. ON tutorialtrigger IF ((X2 > X1) && (X > X1) && (X != 0)) <DRAW 0 SWAPPOINTS X2 Y2 X1 Y1> 5. ON tutorialtrigger IF ((X2 < X1) && (X < X1) && (X != 0)) <DRAW 0 SWAPPOINTS X2 Y2 X1 Y1> 6. ON tutorialtrigger IF ((Y2 > Y1) && (Y > Y1) && (X != 0)) <DRAW 0 SWAPPOINTS X2 Y2 X1 Y1> 7. ON tutorialtrigger IF ((Y2 < Y1) && (Y < Y1) && (X != 0)) <DRAW 0 SWAPPOINTS X2 Y2 X1 Y1>