Jump to content

Detect when player is holding attack key


fcelon

Recommended Posts

Hi,

I have created a weapon with auto attack ability. When player holds attack key (left mouse button), the weapon automatically attacks as fast as possible, so no spamming is needed. I am using mouse event, that triggers whever the button is pressed or released and it works fine. However, the problem is when player pauses the game when auto-attacking. Then the game doesn't recognise, that the button was released and auto attack contiunes untill it's pressed and realsed again. Is there any simple way to solve this problem?

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.