Comparing mzScript variables in regular litestep Thread last updated on 2003-07-10 12:15:28

Posted by member 45783 on 2003-07-10 11:57:29

This may seem noobish, but as I said, I had work to do and now I'm up to implementing saving of variables. The obvious choise would be to use mzScript variables for which there already is natural save functions and which can be manipulated quite easily. Unfortunately it seems that I cannot get true information from these variables to enviroment variables for Litestep to compare and use.

Naturally the first things to try were to search these forums and check the only theme I'm aware of that remembers its settings - Glaze. Unfortunately I didn't find anything relevand and the saving of these settings in Glaze was faked with textreplace and !Reload, which are in my opinion more than a bit unelegant (and more importantly so hard to implement that I'll prefer to try other methods first).

Of course LS and mzScript are totally different enviroments, but the problem is so basic that one would think someone has already found or made a workaround. Does anybody know one?

Posted by member 1 on 2003-07-10 12:00:15 link

you would need to use the IF statements associated with mzScript in order to do what you want. The problem with doing it within LS is that the variable is yet to be defined so it always reports false.

Posted by member 45783 on 2003-07-10 12:12:02 link

The problem is a bit more complicated than it seems. You know, if I have no means to transport true information between mzScript and LS, I will have to fake it and that's gonna be one [a place far down] of a job.

Let's ask in an another way. Is it possible to change the contents of an enviroment variable on the fly?

Posted by member 37809 on 2003-07-10 12:15:28 link

No. Evars weren't designed to be dynamic. I don't know if indiestep's !setvar ever worked/works. (it didn't for me when I tried only once a while back with an anonymous build).

Since I separate mzscript scripts from the step.rc (there's an option to use the step), I just include my varfiles which have variables specifically named as module settings, so that they become evars. The version of mzscript I use does not support spaces/quotes in variables' values, so I use textedit2 for those. Then to apply changes I !reload and !reloadmodule versus a slower and excessive !recycle . The only elegance is in the final experience (if all goes well).