0
$\begingroup$

I've made a shooting scene in the blender game engine and I want a property of the gun to show how many shots have been fired. This is how the shooting works: enter image description here

There's an integer property on the gun called "shots_fired" and I want this property to increase by 1 every time the shoot animation is played. I've tried to have true-level triggering with different skip amounts but it's not working properly

$\endgroup$
3
$\begingroup$

Ironically, we have an "Actuator" sensor. weird right? all you have to do is set up one of these and it will send a positive pulse every time the specified actuator changes.

enter image description here

or (recommended) you can simply hook the property actuator to the exact same sensor that your fire animation uses.

enter image description here

$\endgroup$
  • $\begingroup$ Okay I think the first one will work but with the second method it's difficult to get the right freq. to make it happen at the right time $\endgroup$ – Jacob_ Sep 1 '15 at 10:28
0
$\begingroup$

Check this out. It works for me cause I activated tap. Also in the actuator's column add your action-animation actuator and connect it with the and controller. image

$\endgroup$
  • $\begingroup$ I don't want to activate tap, is there a way to do this without using tap? @Lev $\endgroup$ – Jacob_ Aug 30 '15 at 11:58
  • $\begingroup$ You do not need TAP. It makes no sense in this situation. - The basic idea is to count and fire at the same time. This way the number of counts and the number of fire calls should be equal. This means you can add the controller and the actuator to the sensor from your question $\endgroup$ – Monster Aug 31 '15 at 6:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.