Yes, if you use @set for any set precondition that would work. There is a run on connect script where you can reset them for initial value. Use global scope for your variables. For some things like homing this is even directly available:
state
Printer state based on commands being sent to printer. When printer is controlled outside Felix Server the values may be wrong!
pos_x - X position of printer when all moves are finished.
pos_y - Y position of printer when all moves are finished.
pos_z - Z position of printer when all moves are finished.
is_x_homed - Was x homed during connection.
is_y_homed - Was y homed during connection.
is_z_homed - Was z homed during connection.
is_a_homed - Was a homed during connection.
is_b_homed - Was b homed during connection.
is_c_homed - Was c homed during connection.
power_on - Is software power enabled. This is used for the power on/off button.
relative - Are positions interpreted relative.
e_relative - Are extruder positions interpreted relative.
online - Connection status to primary instance, 0 = unconnected, 1 = connected, 2 = trying to connect
condition - Printer condition:
0 = Unknown - Before connection is established
1 = Ready - We expect commands to be executed
2 = Shutdown - Printer was shut down for operations by intermediate host
3 = Killed - Printer has killed it self waiting in endless loop. Needs reset.
4 = Ignoring - Due to some error not all commands get executed
5 = Offline - intermediate host thinks printer is not enabled
conditionReason (1.4.0) - Line causing print condition in case of errors.
of course is homed doe snot mean firmware ha snot disabled motor and you could have moved it by hand. We can not detect such things.