WebCoRE piston help Setting Variable

How do I capture volume level then restore that level?

Thanks for the response. I have been poking around to try and figure a few things out. I changed the variable to an integer and made it local. as you suggested I’m setting the variable to {volume} = speakers Level;
Setting level gets me nothing but I found that the Samsung R1’s prefer tileset which works to set levels. I seem to have it working but it’s resetting the volume to 15. I don’t have an initial value set. Any idea where it is pulling that level from?

I am so sorry to dredge up this old thread, but I still am not understanding how to get this variable stuff configured. I have a “device” variable set in the define section. See what I have here, I don’t believe I am using the functions correctly.

I have tried clicking on the “if” in the “then” section and set it like this:

I am just not sure how to get this x^2 set variable string, as mine doesn’t look like that. If you want the whole script I can export it with the snapshot I think, right?