Need some help with stopping a timer.
BillyEvs
Member, PRO Posts: 14
Hi,
If i am honest i thought i would be able to over come what seems such a small problem but for the life of me i cant!.
I have a machine gun, with an actor that you press to fire, which in turn every 0.1 second decreases the bullet count-1...
Here comes the issue,
When the bullet count =0 then you can no longer fire(perfect), but if you continue to hold down the fire button from say 2 bullets left the counter will countdown until it reaches 0 then continue firing (and spawning bullets). Ive tried a few fixes, bullet_count =0 change attribute to weaponchange+1. but still no luck.
Thanks alot in advance.
Comments
Just a thought in your fire rule do you have two conditions 1. When touch is pressed and 2. bullets > 0 if so make sure you have All selected in "When All conditions are valid".
EDIT: Attached an example hope it helps
Universal Binary Template - Universal Binary Template Instructions Rev 4 (Short) - Custom Score Display Template
@colander thanks for that, but unfortunately still happening. It does have the >0 rule added also.
You are presenting us with a description of a problem you are having with your code, but you are not telling us anything about how that code is set up - so all people are going to be able to do is guess at how you might have set up your rules and offer suggestions based on those guesses, which is perhaps the slowest and most labour intensive way to diagnoses issues.
Example: I'm doing a calculation and am expecting to get 1044, but I keep getting 1046, I'm not going to show you my calculations, numbers or processes, but can anyone tell me where I am going wrong ?
ah! got it working, turns out you were right. I was looking in the wrong actor, it had nothing to do with the bullet counter actor but more the do with the actual firing actor itself.
Thanks,