No, it won't work, because you move it up to 50, then drop it back by one,
but you don't consistently go back by one.
I'm not sure exactly what you're doing with this (having gradually shaded
sprites?) but consider starting with something like this:
-- Init timex (these are globals or properties) - init somewhere
timex =1
direction =1
maxTimex =50
minTimex =1
on updateTimeX
timex =timeX + direction
if (timeX = maxTimeX or timeX = minTimeX) then
-- Must reverse direction for next time, multiply by -1 to flip direction
direction =direction * -1
end if
-- Now do whatever you want to do with timeX
-- Modify your sprites or whatever
end
At 04:46 PM 1/4/01 -0800, Jonathan wrote:
>I am trying to make the timex go from 1 to 50 when it hits 50 it will go
>from 50 to 1 and repeat this sequence. Its getting stuck always can somebody
>help?
>
>
>property timex,timez
>
>on exitFrame
> timex=timez
> starttimex
>end
>
>on starttimex
> timez=timex+1
>
> if timex=50 then
> timez=timex-1
> end if
>
> set timex to timez
> put timex into member "time"
>
> sprite(1).blend=100
> sprite(2).blend=timex+10
> sprite(3).blend=timex+8
> sprite(4).blend=timex+6
> sprite(5).blend=timex+4
> sprite(6).blend=timex+2
> sprite(7).blend=timex
>end
>
>
>
>[To remove yourself from this list, or to change to digest mode, go to
>http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
>email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
>Lingo-L is for learning and helping with programming Lingo. Thanks!]
>
>
>
>[To remove yourself from this list, or to change to digest mode, go to
>http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
>email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
>Lingo-L is for learning and helping with programming Lingo. Thanks!]
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo. Thanks!]