Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Timer


GodOfYeti
 Share

Recommended Posts

Thread.sleep()

 

Why does everyone think that pausing an application is the same thing as a timer?

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Draco:

Actually when newbies show up here (including me) they always search for some stuff named sleep or wait to pause the execution of some script. (Wait to spawn another stuff, for another particle...)

What they (including me) did not know is that it actually stops the whole minecraft, causing client and server to get messed up in the sync, or crashed as {Ticking Entity} etc.

 

Actually we can use onUpdate functions to count timers. (items and entities have this called every tick)

Link to comment
Share on other sites

Which only works in a multithreaded application, which most applications are not.  That's what gets me.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Lots of other scripting languages for games have a sleep function.  Its something used very often in the Arma Engines.

 

I've seen it far more often than not.

 

OK, fair; I've seen it in Unity3D.  But the command actually spawns a thread and you can't call it from within certain functions (such as the update function) and will throw a compile error if you try.  I used it a few times, but I've done my best to avoid it (can't recall an instance off-hand to remember why I needed it).

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.