Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
Is there any was to make a fully automatic gun? I have the meshes and everything, but how do I make it fire repeatedly as long as the shooting key is held down? |
||||
|
You could do this using either scripting, or start with a behavior "every x second do something", where you check for if the key is down (probably using an 'if' action and a variable, and then do a 'shoot' action. |
||||
|
Okay, but I'm absolutely helpless in scripting... (I'm trying to learn) I'll see if I can figure this out, thanks. |
||||
|
Assign a behavior when a key pressed do something ... Key pressed= left click.. When key pressed down.. Assign an action... Set a variable.... Variable name= auto_shoot Value= 1 Now add the same behavior again... But this time we will change it from key pressed down to key left up. Key pressed = left click When key left up... Assign an action .... Set variable... Variable name = auto_shoot Value= 0 Now assign another behavior... Every few seconds do something... Time ms= 100 Assign action if a variable has value do something... Variable name= auto_shoot Has value = 1 Assign the action shoot bullets Leave the else section empty... Now test the game it will fire the bullets if mouse left button is hold down.. Same thing waas explained by @Niko.. to you in the above post... Hope it will work for u.. |
||||
|
It did, thank you guys so much! |
|