Have problems with small part of a bigger animation. Explanation with the code.[code)
Rem Project: SpriteTesting2
Rem ***** Main Source File *****
set display mode 960,600,32
create animated sprite 54,"mrs ruin.png",8,5,1
` Set the x and y variables
MRX#=-51:MRY#=235
` Set the movement amount
X#=0.15
Y#=0.0
` Set the starting frames
M3=1:M4=8
time=0
do
sprite 54,MRX#,MRY#,1
play sprite 54,M3,M4,150
MRX#=MRX#+X#
MRY#=MRY#+Y#
if MRX#>305 and MRX#<307:M3=9:M4=16:set sprite frame 54,9:Y#=-0.15:endif
if MRY#<100:M3=17:M4=24:set sprite frame 54,17:Y#=0.0:X#=0.0:inc time:endif
if time>500:M3=25:M4=32:X#=0.0:Y#=0.0:endif
if time>1000:Y#=0.15:X#=-0.15:time=1100:endif
if MRY#>236 and MRY#<240:M3=1:M4=8:Y#=0.0:X#=0.15:endif
loop
rem this is a small part of a larger animation, walking in from the left on a footpath
`turning left on another footpath, stopping to watch another animation
`turning arround and walking back down the path, then off to the right.
Rem SIMPLE?, it has driven me nuts for such a small thing and makes me long for Amos Pro and Amal.
rem you can see where the animation goes wrong
Rem Have messed about with Variable "time", this only made things worse.
rem have tried to use "set sprite frame", this only froze the anims.
rem they are waiting outside with the straight jacket,please don't let them in.
rem Only joking, but it has given me some trouble.
old rinkly