It is currently September 18th, 2024, 1:28 pm

Skin not moving correctly

Get help with creating, editing & fixing problems with skins
FoxInTheClouds
Posts: 5
Joined: September 8th, 2023, 5:07 pm

Skin not moving correctly

Post by FoxInTheClouds »

Hello, I am new to Rainmeter skin creation. I am working on a skin with an animated image moving across the screen. I am having issues getting the skin to move. The log triggers correctly, but the move only works once.

Code: Select all

[Rainmeter]
Update = 100

[Animation]
UpdateDivider=3
Measure=Calc
Formula=Animation < 2 ? 2 : (Animation < 5 ? Animation + 1 : 2)
ifEqualValue=4
ifEqualAction=[!Move (#CURRENTCONFIGX#+10) (#SCREENAREAHEIGHT#/2)][!Log "test123"]

[MushroomCharacter]
Meter=Image
ImagePath=#@#Animations
ImageName=frame_0000[Animation].png
DynamicVariables=1
W=600
Thanks in advance for any help.
Last edited by balala on September 8th, 2023, 8:34 pm, edited 1 time in total.
Reason: Please use <code> tags whenever are posting codes. It's the </> button.
User avatar
Yincognito
Rainmeter Sage
Posts: 8171
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Skin not moving correctly

Post by Yincognito »

FoxInTheClouds wrote: September 8th, 2023, 5:29 pm Hello, I am new to Rainmeter skin creation. I am working on a skin with an animated image moving across the screen. I am having issues getting the skin to move. The log triggers correctly, but the move only works once.

[Rainmeter]
Update = 100

[Animation]
UpdateDivider=3
Measure=Calc
Formula=Animation < 2 ? 2 : (Animation < 5 ? Animation + 1 : 2)
ifEqualValue=4
ifEqualAction=[!Move (#CURRENTCONFIGX#+10) (#SCREENAREAHEIGHT#/2)][!Log "test123"]

[MushroomCharacter]
Meter=Image
ImagePath=#@#Animations
ImageName=frame_0000[Animation].png
DynamicVariables=1
W=600

Thanks in advance for any help.
Try enclosing everything in the Formula between brackets and remove spaces (this is unlikely to be the cause, but sometimes helps). The likely cause is missing the DynamicVariables=1 line in the Animation measure. The #CURRENTCONFIGX# and similar built-in variables need it.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
FoxInTheClouds
Posts: 5
Joined: September 8th, 2023, 5:07 pm

Re: Skin not moving correctly

Post by FoxInTheClouds »

Dynamic variables fixed it, thank you for the help!
User avatar
Yincognito
Rainmeter Sage
Posts: 8171
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Skin not moving correctly

Post by Yincognito »

FoxInTheClouds wrote: September 8th, 2023, 6:12 pm Dynamic variables fixed it, thank you for the help!
You're welcome - nice to see a beginner boldly writing the code from scratch according to preferences. :thumbup:
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth