Activate a delay


I’ve search this forum quickly but didn’t find this question wich i need answered.
How do i activate delay?
I shoot a bullet and i want some time between every shot.

anyone a simple idea?

You could try adjusting the tic delay on the sensor you have for shooting.(usually the mouse in FPS’s)

explain, I dont understand… and if i think what you mean than it won’t work. if someone is so hyper active could still shoot very fast(just clicking real fast).

probably the best way to do this (as far as I know) is to use a timer- make it so if the timer is below 0, the gun won’t fire. Every time the gun shoots, set the timer to -something, and thent eh gun will have to wait between shots for the timer to reset. Easier to do in python, but possible with logic bricks too.

It’s the little box that says < f:0 > next to true/false pulsing.

I’ve played with that for hours but if you click very fast it still shoots fast (at least… it does here)

and how do you build a timer in python?

OK, I didn’t actually try it. I was just thinking…

try using the Delay sensor…??

why do you think the topic name is “Activate a delay”
The problem with a delay senser of that it will start the delay whenever the object exists. so when my gun exists it will count down and it won’t shoot again. you can use a repeated delay but then you’d have to click right on on the time the delay stoped because else it start counting again.

So the question is… how can i make it positve when inactive and activate it when i shoot (press a button).

A timer property is probably the way to go.

I say when timer equal 10 (with logicbrick) -> shoot is true
but shoot does not becomes true. if i chose a interval it works… weird.

But it work now, thanks!

Because timers count up very fast by very small amounts, it’s very likely that it will miss an exact number such as 10 (it’ll probably go from 9.99 to 10.01, or something) so looking for an “equal to” value won’t work.