Search found 6 matches
- Tue Feb 14, 2023 1:39 am
- Forum: General
- Topic: Unclear % operation for counting
- Replies: 20
- Views: 6962
Re: Unclear % operation for counting
You folks are the best!! BrotSagtMist, what is that strange notation I havent seen before ? love.load=function()? Is that just a style preference to function love.load() ? It reminds me of code like this that I came across and didnt understand... gStateMachine = StateMachine { ['title'] = function()...
- Sun Feb 12, 2023 11:24 pm
- Forum: General
- Topic: Unclear % operation for counting
- Replies: 20
- Views: 6962
Re: Unclear % operation for counting
thanks alot, again for this amazing description soulmata. So regarding functions, that means if they dont get called in update() regardless where they are written, they never execute? About local variables, I see tutorials that declare local variables in love.load(). Are those still considered globa...
- Sun Feb 12, 2023 7:52 pm
- Forum: General
- Topic: Unclear % operation for counting
- Replies: 20
- Views: 6962
Re: Unclear % operation for counting
I forgot to add one more thing. Am playing around and testing some scoping things regarding your suggestions about the counter. Realized Im in the dark about whats the code execution priority? love.load() gets called only once at the start, got it. love.update(dt) gets called every frame, got it.Wha...
- Sun Feb 12, 2023 12:44 pm
- Forum: General
- Topic: Unclear % operation for counting
- Replies: 20
- Views: 6962
Re: Unclear % operation for counting
super helpful stuff zorg, soulmata and pgimeno. Thanks!!!
- Fri Feb 10, 2023 3:05 pm
- Forum: General
- Topic: Unclear % operation for counting
- Replies: 20
- Views: 6962
Re: Unclear % operation for counting
Wow thanks a lot for such detailed responses. I understand the counter solution without the % and have it in the code working nicely. Im just intrigued from an understanding point of view because I still dont get why the first % == 0 example doesnt print anything but the interval one does. I mean th...
- Wed Feb 08, 2023 2:26 pm
- Forum: General
- Topic: Unclear % operation for counting
- Replies: 20
- Views: 6962
Unclear % operation for counting
Hi there, Finally gathered courage to enter the LÖVE comms. Been steadily learning this great framework but hit a wall and its totally destroying me. In one of my demo projects Im trying to write a debug log for a var from update() every 3 seconds. If I try this counter = counter + dt if (counter % ...