Problem with shooter interval

Questions about how to create your own dungeons and replacement graphics and sounds.

Moderator: George Gilbert

Forum rules
Please read the Forum rules and policies before posting. You may Image to help finance the hosting costs of this forum.
Post Reply
User avatar
Pedro
Journeyman
Posts: 69
Joined: Sun Nov 14, 2004 11:48 pm
Location: Poland

Problem with shooter interval

Post 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.
User avatar
George Gilbert
Dungeon Master
Posts: 3022
Joined: Mon Sep 25, 2000 11:04 am
Location: London, England
Contact:

Post 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?
User avatar
Gambit37
Should eat more pies
Posts: 13769
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post 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.
User avatar
Pedro
Journeyman
Posts: 69
Joined: Sun Nov 14, 2004 11:48 pm
Location: Poland

Post 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.
User avatar
copperman
Um Master
Posts: 476
Joined: Thu Aug 29, 2002 12:49 pm
Location: UK

Post by copperman »

you could use extra relays to disable the switch for a time then re-enable it
User avatar
Pedro
Journeyman
Posts: 69
Joined: Sun Nov 14, 2004 11:48 pm
Location: Poland

Post 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.
User avatar
copperman
Um Master
Posts: 476
Joined: Thu Aug 29, 2002 12:49 pm
Location: UK

Post by copperman »

activate/deactive should achive the same thing surely ?
User avatar
Pedro
Journeyman
Posts: 69
Joined: Sun Nov 14, 2004 11:48 pm
Location: Poland

Post 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.
User avatar
copperman
Um Master
Posts: 476
Joined: Thu Aug 29, 2002 12:49 pm
Location: UK

Post by copperman »

could you perhaps hide then show the switch ?
User avatar
Pedro
Journeyman
Posts: 69
Joined: Sun Nov 14, 2004 11:48 pm
Location: Poland

Post 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.
User avatar
Gambit37
Should eat more pies
Posts: 13769
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post 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
Post Reply