foolberry's Recent Forum Activity

  • All those suggestions are good.

  • foolberry - using a single global would be dangerous if there is any multithreaded parts to C2

    That I didn't think of. I use this alot - not usually globals actually, but object variables. And I've never had a problem with it. I use it where you'd normally call a method in code. But I see there is a threading problem potentially.

  • It's unlikely to be the on tick actions in themselves - I think - more likely to be something nasty nested in one of them. I can't see anything in the code you've posted which would cause a problem.

    Have you tried disabling the onticks one at a time to find if the problem is specific to one of them. And then disabling code within that ontick.

    If you want to only have the GUI update after variable changes then I think the best thing is to handle it all yourself and have an updateGUI global boolean. Set that to true after you've changed a variable etc. And then have a on updateGui condition with all your code inside it, setting updateGUI to false at the end.

  • Can't test easily now because Chrome is now my default. But I definitely had a project open (with layouts open)

  • Well, I've solved it - by checking against the animation frame of the button (is the button down as well). But I still don't see why it doesn't work as written.

    (Although it's neater now since previously the event system was spamming away on every button that the player wasn't touching)

  • WHERE DID EVERYBODY GO???

  • Can you see what's wrong in this code - I'm stuck with it.

    <img src="https://dl.dropbox.com/u/104684620/Capture.JPG" border="0" />

    I'm trying to control a triggerable object with a button. When the button is pressed, then it finds the Triggerable Object with the TargetID and it sets IsTriggered. This works fine.

    When the button is let go, then it should do the same - find the Triggerable Object with the TargetID and set IsTriggered to false. But this is not working.

    Any ideas?

  • Isn't the For Each totally redundent there anyway?

    Might be worth going and reading the tutorial on instance picking.

    scirra.com/manual/75/how-events-work/page-1

    I think there's a more detailed explanation under the For-Each bit of the manual.

  • That is exactly what I meant. Thanks.

  • Can this be reset?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Number 1. Number 2 is not a nice place to be, will be impossible to get to look good, is a maintenance nightmare, will have worse performance, might conceivably save some memory but is not worth it.

    What you're trying to achieve would be better with a pin than with physics, but it's still not worth it. (Sorry just seen this was your plan)

    Just use animations - if you have to optimise (and you may not have to) then do so at the end when you know what has to be achieved by it.

  • so don't worry about code from other layouts hitting the framerate.

    Not unless they're included. But any data - tiled backgrounds, sprites, sfx I guess, will be held in memory all the time at the moment. This is why you get high memory usage warnings from the browser (or at least I do)

foolberry's avatar

foolberry

Member since 4 Aug, 2012

None one is following foolberry yet!

Trophy Case

  • 12-Year Club
  • Email Verified

Progress

13/44
How to earn trophies