Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Programming and Scripting
Disable buttons for given time

dmans420
Registered User
Quote
2019-05-24 04:48:36

Hello all, I have a small problem in the project I'm doing. I am building a FPS prototype, the problem I have run into is when I reload I have it set up to play a reload animation, I can still interrupt it mid way by left clicking to shoot, or right click to aim down sights. I don't consider myself a programmer, although I get the core fundamentals of javascripting in CCB. I think my problem could be solved by a scripted action that 'blocks' the input of a given keycode so it does not register at all, and after a set time the input is returned to true.

My theory is with this kind of script it could be attached to a "when a key is pressed do something" (ie my reload button) the timer begins and blocks the input (like left mouse down for shoot) and then after the time elapses (based on when my reload anim is complete) the button is once again available to use.

Sorry if thats a tall order, again I get fundamentals of scripting no idea about the scope of what can be accomplished, and I have taken my best stab at making the script myself. So any help either way is cool by me.


dmans420
Registered User
Quote
2019-05-24 08:58:50

Phew! okay Ive actually solved my original problem, however the script I theorized on would still come in handy. Anyone down to script that?


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Internatio?al" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact