Page 1 of 1
Problem with shooter interval
Posted: Thu Feb 17, 2005 3:05 pm
by Pedro
Hola,
I have a problem to create a time interval between each two shots of shooter (activated with a button). I don't want to use a simple delay option because it also delays the first shot, which, according to my intention, shouldn't be delayed. I tried various variants with doubled button, relay, etc, but nothing worked as I expect.
Anybody could give me some hint? Is it possible to do at all?
P.
Posted: Thu Feb 17, 2005 3:25 pm
by George Gilbert
How about having your button activate the shooter and a relay. The relay has a delay and then activates the shooter?
That way you get an immediate shot, and then another shot later. Does that work for you?
Posted: Thu Feb 17, 2005 3:46 pm
by Gambit37
Is it that you want first the left hole to shoot, then the right? Does RTC work that way -- I haven't done many experiements with shooters so not sure of their behaviour.
Posted: Thu Feb 17, 2005 5:48 pm
by Pedro
George Gilbert wrote:How about having your button activate the shooter and a relay. The relay has a delay and then activates the shooter?
That way you get an immediate shot, and then another shot later. Does that work for you?
From "a military point of view" your hint doesn't work well. My idea is to create a gun to shoot at monsters. Interval is needed to reload a gun, and notice that without this feature it would be a machine gun

which totally spoils my conception.
I think that best solution for this and similar questions would be to add two new options for triggers - enable and disable. In my opinion, it would noticeably extend the engine possibilities. Now we have only "disable self" and there is not possible to enable disabled trigger again.
Gambit37 wrote:Is it that you want first the left hole to shoot, then the right? Does RTC work that way -- I haven't done many experiements with shooters so not sure of their behaviour.
No, I need a single shoot which can be repeat by player only when time >= interval.
Simpler, I need, for example, to limit shot frequency (but not delay it) to 1 per 2 seconds.
Posted: Mon Feb 21, 2005 10:32 pm
by copperman
you could use extra relays to disable the switch for a time then re-enable it
Posted: Tue Feb 22, 2005 6:23 pm
by Pedro
copperman wrote:you could use extra relays to disable the switch for a time then re-enable it
Yes, but notice that we haven't implemented these options (disable and enable) in the masterwork of George. "Disable self" isn't sufficient to do it.
P.
Posted: Tue Feb 22, 2005 6:31 pm
by copperman
activate/deactive should achive the same thing surely ?
Posted: Tue Feb 22, 2005 8:58 pm
by Pedro
copperman wrote:activate/deactive should achive the same thing surely ?
No, it's not the same because "re-activate" genarates a second undesirable event.
Disable of a trigger would cause that such options like toggle, activate or deactivate are off as long as it turns into enabed state.
P.
Posted: Tue Feb 22, 2005 11:07 pm
by copperman
could you perhaps hide then show the switch ?
Posted: Wed Feb 23, 2005 5:13 pm
by Pedro
copperman wrote:could you perhaps hide then show the switch ?
Interesting idea but it doesn't work. I can hide a button only in design-time and not in run-time (or I don't know how to do it).
I also tried with cloned button and void bitmaps for alternate state - unfortunately, the button can be clicked also when invisible.
P.
Posted: Wed Feb 23, 2005 9:02 pm
by Gambit37
What you need is the ability for one actuator to be able to selectively enable/disable another one.
I did ask for this 3½ years ago but it seems to have got lost in the pile!
http://www.dungeon-master.com/forum/vie ... 7052#17052
It came up again 2½ years ago and was never followed up:
http://www.dungeon-master.com/forum/vie ... hp?t=20397