[Suggestion] Just a tick

0 favourites
  • 12 posts
  • Im having to use Wait a lot to allow the engine to update.

    The thing is its difficult to know how long it should wait.

    I know I just need a tick, but a tick can vary over different platforms, hardware, etc.

    I've tried wait dt, but that doesn't give it quite enough time, and you most definitely don't want to wait longer than a tick if you can.

    Anyway my suggestion would be either a new expression for the time it would take to update, IE a tick, or an addition to the system wait that works the same way.

  • +1 , I was thinking about this a lot today too! A sort of "Tick Wait" where we can specify the amount of ticks to wait. :P

  • You can do that already. There's the system expression tickcount. Just store tickcount to a variable in the affected event and then check for tickcount + 1 (or + n)

    Edit: Of course you would check for

    tickcount = variable + n

  • You can do that already. There's the system expression tickcount. Just store tickcount to a variable in the affected event and then check for tickcount + 1 (or + n)

    Edit: Of course you would check for

    tickcount = variable + n

    Like compare variable=tickcount+ n, do stuff?

    Yeah, I'm way to lazy for that.

  • Doesn't "wait 0 seconds" already wait 1 tick?

    From the manual:

    ne more trick: "Wait 0 seconds" postpones the following actions until the end of the event sheet.

  • Well it may need longer for somethings.

    For example the browser object trigger on re-sized needs a wait longer than 0.10 to get the new size.

  • Yeah, I'm way to lazy for that.At least you're honest. <img src="smileys/smiley4.gif" border="0" align="middle" />

  • Doesn't "wait 0 seconds" already wait 1 tick?

    From the manual:

    ne more trick: "Wait 0 seconds" postpones the following actions until the end of the event sheet./QUOTE] +1

  • Well, I use "Wait 0" a lot already, however I was thinking more of something that, instead of executing the action at the end of the event sheet, it will continue to wait til it reaches the "Wait tick" again THEN execute. But yeah :P

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • And what's the problem using tickcount? I use it all the time for exactly the situations, newt explained in his first post. Isn't such a big deal.

  • Yeah I dunno why I even posted that, tickcount is perfect for what I wrote. Failing to take in information since I'm heavily sleep deprived. Thanks for sharing the method, never would have thought of it myself!

  • I just invented "The Whack-A-Mole Method" using the timer behavior.

    You do your actions while a timer is running.

    Probably not good for every situation since it would do things multiple times.

    Its not pretty, but its as efficient as a shotgun in a knife fight.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)