Quantcast
Channel: Rainmeter Forums
Viewing all articles
Browse latest Browse all 703

Tamagochi game help

$
0
0
i was working on this tamagachi code and i've made the 3 hearts decrease level overtime (full=half=dead) and when i feed it and do other stuff it enterferes because lets say i have 1 full heart, 1 half and one dead. when i click the feed button it goes by a specific row (heart1,hear2,heart3) but it looks messy and i was wondering if you could fix it by skipping a full heart and showing a full heart for when lets say heart2 is dead and heart1 a half heart when i click again so it doesnt look unequal. hopefully i explained it well. there are also a lot of errors and overlays with the images i could really use some help in patching them so everything runs smoothly

https://mega.nz/file/FbMEgApQ#fjhcqkQjbgrhTXWLvt4tyb5fQxBlNvf5ctqCp2-xmlM

Code:

[Metadata]Name=TamagotchiWidgetAuthor=Your NameInformation=Displays a sequence of images to simulate GIF animation with a backgroundVersion=1.0[Variables]Counter=0HiddenStatus=0ClickCount=0NumOfClicks=7[MeasureHeartLoop]Measure=LoopStartValue=0EndValue=10000000Increment=1UpdateDivider=1DynamicVariables=1[MeasureTimer]Measure=CalcFormula=(Counter % 1000)UpdateDivider=1DynamicVariables=1[MeasureCounter]Measure=CalcFormula=Counter + 1UpdateDivider=10DynamicVariables=1[ImageNumberCalc]Measure=CalcFormula=Counter % 6DynamicVariables=1[WindowMeter]Meter=ImageImageName=window0.pngX=-80Y=-120W=490H=490AntiAlias=1DynamicVariables=1[BackgroundMeter]Meter=ImageImageName=background.pngX=19Y=24W=294H=196AntiAlias=1DynamicVariables=1[TextButton]Meter=StringText=ㅤFontSize=15FontColor=255,255,255,255X=246Y=250LeftMouseUpAction=[!ToggleMeter BackgroundMeter1][!UpdateMeter BackgroundMeter1][BackgroundMeter1]Meter=ImageImageName=ocean.png  X=19Y=24W=294H=196Hidden=1[BackgroundMeter2]Meter=ImageImageName=grass.png  X=19Y=24W=294H=196Hidden=1[TextButton6]Meter=StringText=ㅤFontSize=15FontColor=255,255,255,255X=268Y=250LeftMouseUpAction=[!ToggleMeter BackgroundMeter2][!UpdateMeter BackgroundMeter2][ImageMeter]Meter=ImageImageName=idle[ImageNumberCalc].pngX=60Y=25W=200H=200AntiAlias=1DynamicVariables=1[ImageNumberCalc4]Measure=CalcFormula=Counter % 4DynamicVariables=1[ImageMeter2]Meter=ImageImageName=sleeping[ImageNumberCalc4].png  X=19Y=24W=200H=200AntiAlias=1DynamicVariables=1Hidden=1UpdateDivider=1 [TextButton3]Meter=StringText=ㅤFontSize=20FontColor=255,255,255,255X=68Y=253LeftMouseUpAction=[!SetVariable SleepLevel (SleepLevel + 10)] & [!CommandMeasure MeasureSleepLevel "Update"] & [!SetOption WindowMeter ImageName "sleep_bar4.png"] & [!UpdateMeter WindowMeter] & [!Redraw] & [!ToggleMeter ImageMeter] & [!ToggleMeter ImageMeter2] & [!UpdateMeter ImageMeter2][ImageNumberCalc1]Measure=CalcFormula=Counter % 16DynamicVariables=1[ImageMeter5]Meter=ImageImageName=walk[ImageNumberCalc1].pngX=-13Y=25W=390H=200AntiAlias=1DynamicVariables=1Hidden=1UpdateDivider=1  [TextButton4]Meter=StringText=ㅤFontSize=20FontColor=255,255,255,255X=100Y=253LeftMouseUpAction=[!ToggleMeter ImageMeter][!ToggleMeter ImageMeter5][!UpdateMeter ImageMeter5][Heart1]Meter=ImageImageName=full_heart.pngX=-14Y=-10W=100H=100DynamicVariables=1[Heart2]Meter=ImageImageName=full_heart.pngX=18Y=-10W=100H=100DynamicVariables=1[Heart3]Meter=ImageImageName=full_heart.pngX=50Y=-10W=100H=100DynamicVariables=1[MeasureHeart3]Measure=CalcFormula=MeasureHeartLoopIfCondition=(MeasureHeartLoop >= 30)IfTrueAction=[!SetOption Heart3 ImageName "full_heart.png"][!UpdateMeter Heart3][!Redraw]IfCondition2=(MeasureHeartLoop >= 60)IfTrueAction2=[!SetOption Heart3 ImageName "half_heart.png"][!UpdateMeter Heart3][!Redraw]IfCondition3=(MeasureHeartLoop >= 90)IfTrueAction3=[!SetOption Heart3 ImageName "dead_heart.png"][!UpdateMeter Heart3][!Redraw]DynamicVariables=1[MeasureHeart2]Measure=CalcFormula=MeasureHeartLoopIfCondition=(MeasureHeartLoop >= 120)IfTrueAction=[!SetOption Heart2 ImageName "full_heart.png"][!UpdateMeter Heart2][!Redraw]IfCondition2=(MeasureHeartLoop >= 150)IfTrueAction2=[!SetOption Heart2 ImageName "half_heart.png"][!UpdateMeter Heart2][!Redraw]IfCondition3=(MeasureHeartLoop >= 180)IfTrueAction3=[!SetOption Heart2 ImageName "dead_heart.png"][!UpdateMeter Heart2][!Redraw]DynamicVariables=1[MeasureHeart1]Measure=CalcFormula=MeasureHeartLoopIfCondition=(MeasureHeartLoop >= 210)IfTrueAction=[!SetOption Heart1 ImageName "full_heart.png"][!UpdateMeter Heart1][!Redraw]IfCondition2=(MeasureHeartLoop >= 240)IfTrueAction2=[!SetOption Heart1 ImageName "half_heart.png"][!UpdateMeter Heart1][!Redraw]IfCondition3=(MeasureHeartLoop >= 270)IfTrueAction3=[!SetOption Heart1 ImageName "dead_heart.png"][!UpdateMeter Heart1][!ToggleMeter ImageMeter][!ToggleMeter ImageMeter12][!UpdateMeter ImageMeter11][!Redraw]DynamicVariables=1[ImageMeter12]Meter=ImageImageName=dead.pngX=60Y=50W=200H=200AntiAlias=1DynamicVariables=1Hidden=1[ImageMeter13]Meter=ImageImageName=hospital.pngX=90Y=50W=150H=150AntiAlias=1DynamicVariables=1Hidden=1[HospitalButton]Meter=StringText=ㅤX=287Y=250FontSize=14LeftMouseUpAction=[!ToggleMeter ImageMeter][!ToggleMeter ImageMeter13][!UpdateMeter ImageMeter13][!SetVariable Counter "((#Counter#+1)%#NumOfClicks#)"][!UpdateMeasure "MeasureHeartLoop"]DynamicVariables=1[ImageNumberCalc5]Measure=CalcFormula=Counter % 5DynamicVariables=1[ImageMeter3]Meter=ImageImageName=burger[ImageNumberCalc5].pngX=60Y=25W=200H=200AntiAlias=1DynamicVariables=1Hidden=1[MeasureHeartLoop1]Measure=CalcFormula=#Counter#IfCondition=(#CURRENTSECTION#=0)IfTrueAction=[!UpdateMeter "Heart1"][!UpdateMeter "Heart2"][!UpdateMeter "Heart3"][!Redraw]IfCondition2=(#CURRENTSECTION#=1)IfTrueAction2=[!SetOption Heart1 ImageName "half_heart.png"][!UpdateMeter "Heart1"][!Redraw]IfCondition3=(#CURRENTSECTION#=2)IfTrueAction3=[!SetOption Heart1 ImageName "full_heart.png"][!UpdateMeter "Heart1"][!Redraw]IfCondition4=(#CURRENTSECTION#=3)IfTrueAction4=[!SetOption Heart2 ImageName "half_heart.png"][!UpdateMeter "Heart2"][!Redraw]IfCondition5=(#CURRENTSECTION#=4)IfTrueAction5=[!SetOption Heart2 ImageName "full_heart.png"][!UpdateMeter "Heart2"][!Redraw]IfCondition6=(#CURRENTSECTION#=5)IfTrueAction6=[!SetOption Heart3 ImageName "half_heart.png"][!UpdateMeter "Heart3"][!Redraw]IfCondition7=(#CURRENTSECTION#=6)IfTrueAction7=[!SetOption Heart3 ImageName "full_heart.png"][!UpdateMeter "Heart3"][!Redraw]DynamicVariables=1[FeedButton]Meter=StringText=ㅤX=34Y=250FontSize=20LeftMouseUpAction=[!ToggleMeter ImageMeter][!ToggleMeter ImageMeter3][!UpdateMeter ImageMeter3][!SetVariable Counter "((#Counter#+1)%#NumOfClicks#)"][!UpdateMeasure "MeasureHeartLoop"]DynamicVariables=1[DebugLoop]Meter=StringText=[MeasureHeartLoop]Fontcolor=100,201,90fontweight=700X=96Y=222FontSize=10DynamicVariables=1[MeasureSleepLoop]Measure=LoopStartValue=0EndValue=100Increment=1UpdateDivider=50DynamicVariables=1[MeasureSleepLevel]Measure=CalcFormula=MeasureHeartLoopIfCondition=(MeasureHeartLoop >= 25)IfTrueAction=[!SetOption WindowMeter ImageName "sleep_bar4.png"][!UpdateMeter WindowMeter][!Redraw]IfCondition2=(MeasureHeartLoop >= 50)IfTrueAction2=[!SetOption WindowMeter ImageName "sleep_bar3.png"][!UpdateMeter WindowMeter][!Redraw]IfCondition3=(MeasureHeartLoop >= 75)IfTrueAction3=[!SetOption WindowMeter ImageName "sleep_bar2.png"][!UpdateMeter WindowMeter][!Redraw]IfCondition4=(MeasureHeartLoop >= 100)IfTrueAction4=[!SetOption WindowMeter ImageName "sleep_bar1.png"][!UpdateMeter WindowMeter][!Redraw]DynamicVariables=1[ImageMeter10]Meter=ImageImageName= music.pngX=-83Y=-128W=500H=500AntiAlias=1DynamicVariables=1[ImageNumberCalc6]Measure=CalcFormula=Counter % 6DynamicVariables=1[ImageMeter11]Meter=ImageImageName=dance[ImageNumberCalc6].pngX=60Y=25W=200H=200AntiAlias=1DynamicVariables=1Hidden=1[DanceButton]Meter=StringText=ㅤX=140Y=255FontSize=20LeftMouseUpAction=[!ToggleMeter ImageMeter][!ToggleMeter ImageMeter11][!UpdateMeter ImageMeter11][!SetVariable Counter "((#Counter#+1)%#NumOfClicks#)"][!UpdateMeasure "MeasureHeartLoop"]DynamicVariables=1

Statistics: Posted by delirious — Yesterday, 5:29 pm — Replies 0 — Views 789



Viewing all articles
Browse latest Browse all 703

Trending Articles