Jump to content

How delay something


Snaking

Recommended Posts

I wanted a delay to read the line below the code, I would use this in several places of the code. Basically it would take a few seconds to send a pro player message(This is one of the things I want with delay)

 

I was using Thread to delay it, But use more than 1 Thread in the same method will be bad

Edited by Snaking
Link to comment
Share on other sites

5 minutes ago, Snaking said:

Oh, one of delay is to send message to player, Like 2/4 sec delay.

A delay from what in-game event or stimulus?

5 minutes ago, Snaking said:

Does each method have a specific way of using the delay?

Yes. You need to count ticks, but the way to do that is different depending on the context, which still isn't clear.

Link to comment
Share on other sites

Well, I want just delay messages. Like as I said:

 

//When the player join in a server will send (examples):
sendMessage("Message#1");
//And this second message I wanted like 2secs delay:
sendMessage("Message#2 With 2sec delay");

 

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

Announcements



×
×
  • Create New...

Important Information

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