Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Hello there, I wanted to know how can I put a delay in my code like: (without use Timers )

 

//First message:
sendMessage("1");
//I want to show this message 3 seconds after the first
sendMessage("2");

Thank you.

  • Author

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

  • Author

Oh, one of delay is to send message to player, Like 2/4 sec delay. Does each method have a specific way of using the delay?

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.

  • Author
2 minutes ago, Jay Avery said:

A delay from what in-game event or stimulus?

Hm, The message who are sending is within a method I have created, And I call this method in an event

Just now, Snaking said:

Hm, The message who are sending is within a method I have created, And I call this method in an event

Can you please just describe what you intend to happen for a player, without referring to the code involved.

  • Author

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");

 

  • Author
1 minute ago, Jay Avery said:

So you want the messages to happen with a delay when the player joins the server?

Yeah

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.