How to increase a variable every second

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
TheApexEffect
Posts: 6
Joined: Mon Nov 18, 2013 8:34 pm

How to increase a variable every second

Post by TheApexEffect » Tue Nov 26, 2013 11:27 am

I'm currently running into problems with creating a running score. I'm looking to have a score that increases by 100 every second but I'm not sure if a function exists to perform that or if i have to hack something together. Thanks in advance and any help would be very appreciated

LCNeil
Livecode Staff Member
Livecode Staff Member
Posts: 1223
Joined: Wed Oct 03, 2012 4:07 pm

Re: How to increase a variable every second

Post by LCNeil » Tue Nov 26, 2013 11:57 am

Hi Apex,

An easy way to do this is via a "send" which is non-blocking.

Please see the attached stack for some example script.

Kind Regards

Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
LiveCode – Realize fast, compile-free coding

--
Attachments
Simple Score.livecode.zip
(1.03 KiB) Downloaded 185 times

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10331
Joined: Wed May 06, 2009 2:28 pm

Re: How to increase a variable every second

Post by dunbarx » Tue Nov 26, 2013 2:40 pm

Hi.

Check out this recent thread:

http://forums.runrev.com/viewtopic.php?f=7&t=16458

Craig Newman

Post Reply