Spending about hour this morning I created a test harness to prove that Global Variables are written as a whole from a piston not just changes. I created 4 simple pistons that set it’s own global to it’s piston number in the test when the test global goes true and then back to zero when false The results were that only 2 of the 4 global’s reset to zero after the first time executed. I assume this is a bug not a feature
I am attaching my testing pistons for review by the community along with the variables
Below are the final logs from the pistons when setting the value of each pistons global variable back to zero:
Piston #1
4/28/2018 6:57:17 AM +441ms
+0ms╔Received event [Home].:07ee06c3a2155dec348066845fb71c98: = @fTest with a delay of 79ms+96ms║RunTime Analysis CS > 25ms > PS > 43ms > PE > 29ms > CE
+99ms║Runtime (39030 bytes) successfully initialized in 43ms (v0.3.104.20180323) (97ms)
+100ms║╔Execution stage started
+108ms║║Comparison (boolean) false is (boolean) true = false (2ms)
+109ms║║Cancelling condition #4’s schedules…
+110ms║║Condition #4 evaluated false (6ms)
+111ms║║Cancelling condition #1’s schedules…
+112ms║║Condition group #1 evaluated false (state changed) (7ms)
+118ms║║Comparison (boolean) false is (boolean) false = true (1ms)
+119ms║║Condition #8 evaluated true (5ms)
+120ms║║Condition group #5 evaluated true (state did not change) (6ms)
+122ms║║Cancelling statement #6’s schedules…
+125ms║║Executed virtual command setVariable (1ms)
+131ms║║Calculating (string) Test Piston 1 exited with @sTestPiston1 set to + (string) 0 >> (string) Test Piston 1 exited with @sTestPiston1 set to 0
+134ms║╚Execution stage complete. (34ms)
+135ms╚Event processed successfully (135ms)
Piston #2
4/28/2018 6:57:17 AM +439ms
+0ms╔Received event [Home].:07ee06c3a2155dec348066845fb71c98: = @fTest with a delay of 78ms+93ms║RunTime Analysis CS > 25ms > PS > 44ms > PE > 24ms > CE
+95ms║Runtime (39016 bytes) successfully initialized in 44ms (v0.3.104.20180323) (94ms)
+96ms║╔Execution stage started
+105ms║║Comparison (boolean) false is (boolean) true = false (1ms)
+106ms║║Cancelling condition #4’s schedules…
+107ms║║Condition #4 evaluated false (6ms)
+108ms║║Cancelling condition #1’s schedules…
+108ms║║Condition group #1 evaluated false (state changed) (7ms)
+115ms║║Comparison (boolean) false is (boolean) false = true (1ms)
+116ms║║Condition #8 evaluated true (5ms)
+117ms║║Condition group #5 evaluated true (state did not change) (5ms)
+119ms║║Cancelling statement #6’s schedules…
+122ms║║Executed virtual command setVariable (1ms)
+128ms║║Calculating (string) Test Piston 2 exited with @sTestPiston2 set to + (string) 0 >> (string) Test Piston 2 exited with @sTestPiston2 set to 0
+131ms║╚Execution stage complete. (35ms)
+132ms╚Event processed successfully (132ms)
Piston #3
4/28/2018 6:57:17 AM +448ms
+1ms ╔Received event [Home].:07ee06c3a2155dec348066845fb71c98: = @fTest with a delay of 87ms+101ms║RunTime Analysis CS > 18ms > PS > 57ms > PE > 26ms > CE
+104ms║Runtime (39017 bytes) successfully initialized in 57ms (v0.3.104.20180323) (103ms)
+105ms║╔Execution stage started
+113ms║║Comparison (boolean) false is (boolean) true = false (1ms)
+115ms║║Cancelling condition #4’s schedules…
+116ms║║Condition #4 evaluated false (6ms)
+117ms║║Cancelling condition #1’s schedules…
+117ms║║Condition group #1 evaluated false (state changed) (8ms)
+124ms║║Comparison (boolean) false is (boolean) false = true (1ms)
+125ms║║Condition #8 evaluated true (5ms)
+126ms║║Condition group #5 evaluated true (state did not change) (6ms)
+128ms║║Cancelling statement #6’s schedules…
+132ms║║Executed virtual command setVariable (0ms)
+138ms║║Calculating (string) Test Piston 3 exited with @sTestPiston3 set to + (string) 0 >> (string) Test Piston 3 exited with @sTestPiston3 set to 0
+141ms║╚Execution stage complete. (37ms)
+142ms╚Event processed successfully (142ms)
Piston #4
4/28/2018 6:57:17 AM +400ms
+1ms╔Received event [Home].:07ee06c3a2155dec348066845fb71c98: = @fTest with a delay of 39ms+71ms║RunTime Analysis CS > 20ms > PS > 31ms > PE > 20ms > CE
+73ms║Runtime (39016 bytes) successfully initialized in 31ms (v0.3.104.20180323) (72ms)
+74ms║╔Execution stage started
+82ms║║Comparison (boolean) false is (boolean) true = false (1ms)
+83ms║║Cancelling condition #4’s schedules…
+84ms║║Condition #4 evaluated false (5ms)
+85ms║║Cancelling condition #1’s schedules…
+86ms║║Condition group #1 evaluated false (state changed) (8ms)
+91ms║║Comparison (boolean) false is (boolean) false = true (1ms)
+92ms║║Condition #8 evaluated true (4ms)
+93ms║║Condition group #5 evaluated true (state did not change) (5ms)
+95ms║║Cancelling statement #6’s schedules…
+98ms║║Executed virtual command setVariable (1ms)
+104ms║║Calculating (string) Test Piston 4 exited with @sTestPiston4 set to + (string) 0 >> (string) Test Piston 4 exited with @sTestPiston4 set to 0
+107ms║╚Execution stage complete. (32ms)
+108ms╚Event processed successfully (107ms)