>on exiteframe me
> set timex to timex+1
> put timex into member "showTime"
>end
>
>It works ok but it seems to slow the whole game down a lot, is this regular?
>Should i use someting lse to represent a timer?
It does seem odd that it would be slowing things down. Have you eliminated
other possible causes?
Basing a timer on a frame event is pretty unreliable. The frame rate you
set is only a request--a frame won't cycle until it has finished processing
everything that happens in that frame. You could set the frame rate to 60
fps, and only be getting 2 fps.
If you're using D8, look up timeout objects under "New" in the Lingo
dictionary. They're a lot more reliable, though they have some odd side
effects.
You'll want something like this:
property pMyTime
-- in the initialization handler
pMyTime = 0
-- in some script
timeout("myTimer").new(1000, #showTime, me)
--somewhere else in the same script
on showTime
pMyTime = pMyTime + 1
put pMyTime into member "showTime"
end
You can take it from there--put it in a parent script, etc. At least this
way you're guaranteed the showTime handler will be called once per second
(that's the 1000 in the parameters to the new() call--that's milliseconds).
Cordially,
Kerry Thompson
Learning Network
[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!]