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

I want to register many clicks (CPS) when clicked. But I don't know how to. I'll greatly appreciate your help!

  • Author
2 minutes ago, diesieben07 said:

 

 

Uhh, I did that but it only registers 1 click (after the click), I mean

Edited by lethinh

  • Author
4 minutes ago, diesieben07 said:
  • Your onClientTick method executes twice every tick. You must check TickEvent::phase.
  • Why do you have that clickedThisTick thing anyways?
  • I don't see you removing anything from that list.
  • I don't see you displaying the list anywhere.

I don't really understand what you mean. And I'm not going to display this list, and where to remove click from the list (onClientTick)?

Edited by lethinh

  • Author
1 minute ago, diesieben07 said:

Then what are you going to do with it?

 

Before you use it in any way you have to cleanse it of old entries.

I mean I'm going to register many clicks when I clicked, not for displaying it. And onClientTick is where I have to remove the old entries?

  • Author
4 minutes ago, diesieben07 said:

Yes, but you must do something with this value, right? Otherwise why would you calculate it. Show this something.

 

No. Read again what I said.

Oh, but what do I have to do with the list? You said in the cps reply that just add System.currentTimeMillis() to the list. (May be I misunderstanded)

Edited by lethinh

  • Author
Just now, diesieben07 said:

Yes, you have to add it to the list. But if you then never do anything with the list, why collect the values?

Why do you want to know the CPS? You must want to do something with the cps value, right? Do you want to display it? Give something to the player based on it? Collect statistics?

Just kind of like that. But I thought I added 

  1. clicks.add(Long.valueOf(System.currentTimeMillis()));
in the code.
  • Author
Just now, diesieben07 said:

Dude, seriously?

Take this example: The game measures FPS. Why does it do that? So that it can display it in the debug screen.

Why do you want to measure CPS? Just to consume CPU and memory resources? 

Umm, but you said that is the way to increase CPS. So what is the way to get many clicks after I clicked?

  • Author
7 minutes ago, diesieben07 said:

Increase CPS? No, this is a way to measure CPS.

The way to "increase CPS" is to click faster.

Ok, so I have to create a "bot" (using java.awt.Robot)

  • Author
Just now, diesieben07 said:

Wait... you are trying to... multiply the users clicks?!

Yup, you told me to "click faster" so just "bot"

  • Author
5 minutes ago, diesieben07 said:

Wait... you are trying to... multiply the users clicks?!

Umm, I started worrying. Is this correct?

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.