I'd like to add a variable to the end script that is used in another slicer to lower the bed after a print.
This is the statement in the other slicer - the section in BOLD is the variable that moves the bed lower.
The specific variable is "max_layer_z" I haven't been able to find a corresponding one for S3D.
M17 Z0.4 ; lower z motor current to reduce impact if there is something in the bottom
{if (max_layer_z + 100.0) < 250}
G1 Z{max_layer_z + 100.0} F600
G1 Z{max_layer_z +98.0}
{else}
G1 Z250 F600
G1 Z248
{endif}
M400 P100
M17 R ; restore z current