Quote:
Originally Posted by Down with duke
Wow thanks, that worked great. But let me see if I can't explain myself a bit better on the first part...
From what I understand the "On Click" event loop captures mouse clicks and points them to a method, however, if the method the "On click" event was told to preform takes longer than it takes for the player to click agian then the event loop will make a list of that method to preform sequentially. This is bad for me because if you continuously click, the gun I have positioned wont stop shooting until it finishes playing through all of them.
If you want to see the problem for yourself I attached what I have so far: http://www.mediafire.com/?idyomjzgyyh
|
Are you using "bullets"? If so, you could have one bullet that returns to the gun after every shot. Then set up a function so that the bullet has to be "in" the gun before the gun will shoot. That way if the bullet is "down range" and you click again nothing will happen.
1) you would need a boolean variable set to false. Then create event: When "object" is clicked on set "variable" to "true"
2) Create another event: When "variable" is "true" and "bullet" is within 1 meter of "gun" do: "gunShoot" and "setVariableFalse"
Here is a world where I'm using the tennis ball as "bullets". See if this helps you out.