1
$\begingroup$

The title basically says it all, but not in any explanation. I have a weapon, and, for instance, it fires every 30 tics if you hold down mouse click. I am not sure how fast 30 tics is as of now, but I know I can say someone can click fast enough to shoot faster than expected and implemented. How can I have clicking also work at 30 tics in logic bricks as simple as possible?

$\endgroup$

1 Answer 1

5
$\begingroup$

This is very easy but you are thinking about it from the wrong approach. Instead of setting a delay between the positive pulses, Create a reload property that is always increasing as long as that same property is less than a specific amount. In this case, it is 30.

enter image description here

Then have another property sensor limiting the mouse's input so that it will only send a positive pulse when the reload is at 30.

When using a system like this, you can hammer on the mouse as fast as you want, but it will only fire when the reload property reaches 30. and as soon as you click, The reload property starts increasing until it reaches 30, where you will be ready to fire again.

$\endgroup$
3
  • $\begingroup$ Ah. I already have an extremely advanced recoil system I setup, and I was hoping this would we as simple as one sensor with some adjustments. Anyways, thanks! $\endgroup$
    – blackhole
    Mar 21, 2015 at 4:10
  • $\begingroup$ Depending on how complicated your recoil system is, It shouldn't be too hard to just have the left click and reload equal to 30 sensors go into the controllers where you previously just had the one mouse sensor. $\endgroup$ Mar 21, 2015 at 15:18
  • $\begingroup$ I mean yes, it wont be hard but it will be extremely dirty. $\endgroup$
    – blackhole
    Mar 21, 2015 at 20:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .