So, if you're interested, here is what to do: first create a Change.lua file into the @Resources folder of your config and add the following content:
Code: Select all
function Initialize()
GeoPrev = SKIN:GetMeasure('GeoMeasure'):GetValue()
end
function Update()
Geo = SKIN:GetMeasure('GeoMeasure'):GetValue()
GeoChange = Geo - GeoPrev
SKIN:Bang('!SetVariable', 'GeoChange', GeoChange)
GeoPrev = Geo
end
Now, if the returned GeoChange variable is positive, means that the value of the [GeoMeasure] measure grew, if it's negative, the value of the measure decreased. The last thing you have to do is to execute the appropriate actions (bangs) according to the sign of the returned variable: if this variable is positive, the playing of the wav file should start and the color of the [GeoMeter] meter should be set.
To do all this, first you have to add a Script and a Calc measure to the code of the skin. Add the followings:
Code: Select all
[MeasureLuaScript]
Measure=Script
ScriptFile=#@#Change.lua
[MeasureGeoChange]
Measure=Calc
Formula=#GeoChange#
IfCondition=(MeasureGeoChange>0)
IfTrueAction=[!SetOption GeoMeter FontColor "247,202,24,255"]
DynamicVariables=1
You don't need any more the [MeasureMax] and [Timer] measure. Remove them.
The only disadvantage of this modifications is that immediately after the refresh, the sound will start to play, you'll have to click to stop it. I hope you can live with this inconvenience.