Jump to content

Turning the time a player holds down a mouse button into a variable.


Recommended Posts

Posted

Okay, I'm currently working on the Metroid Prime mod and one of the key aspect to metroid is the Charge Beam. I would like to take to time a player holds down the fire button and turn this into a variable which I would use to calculate the size and power of the shot. MachineMuse did practically the same thing with the Modular Power Suits mod. I've looked at the source code for the power suits but I have yet to figure out exactly how it was down. Does anyone here have any input on the subject?

 

Also, if anyone knows any good tutorials for the following subjects updated to 1.5 that would be a great help:

- Multiblocks

- New Dimensions

- Dimension Portals

 

~Sypher

I am the current head modder for the Metroid Prime Suits mod. I have no other staff members, so I'm hiring! I also co-own the SkyTekkit server.

width=600 height=126http://i1276.photobucket.com/albums/y480/Sypher40/MPSbanner_zps9d50d86a.png[/img]

Posted

Hey Sypher!

 

I've been working on a similar thing for a mod that I'm making and I think I may be able to help you.  If you wanted to, you could make a MouseListener that extends the mod mouse listener.  I have some basic code if you would like a look!  Send me a PM, I think I understand what you want, and I think I can help with your issue!

 

Thanks,

Mrkennedyfreak

Posted

Okay, I'm currently working on the Metroid Prime mod and one of the key aspect to metroid is the Charge Beam. I would like to take to time a player holds down the fire button and turn this into a variable which I would use to calculate the size and power of the shot. MachineMuse did practically the same thing with the Modular Power Suits mod. I've looked at the source code for the power suits but I have yet to figure out exactly how it was down. Does anyone here have any input on the subject?

 

Also, if anyone knows any could tutorials for the following subjects updated to 1.5 that would be a great help:

- Multiblocks

- New Dimensions

- Dimension Portals

 

~Sypher

 

Look at itembow and how it sets the amount of time to right click into a tick counter, and you could create a max amount of ticks that devided the number of ticks it has been held. This would create a constant counter that gradually increases as you hold it!

This is the creator of the Rareores mod! Be sure to check it out at

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.