Mikemc
Quake 2 Mapping Club
Reminiscing this & that & having such a good time
Posts: 344
|
Post by Mikemc on Jun 26, 2008 3:51:27 GMT -5
I have a button that activates a blaster. I want the blaster to fire 10 times, every time the button is pressed. How can I set this up without using 9 relays?
- Mike
|
|
X7[Q2C]
Clan Q2C
100%
Quake II[x=x7a]
Posts: 1,429
|
Post by X7[Q2C] on Jun 26, 2008 5:58:23 GMT -5
Use 10 trigger_relay.
The func_button targets the 10 trigger_relay with different delays set, and the trigger_relay's target the target_blaster.
X7
|
|
|
Post by Paril on Jun 26, 2008 10:09:04 GMT -5
Lol, nice one X7 ^_^
It's the only way to do it, Mike. Refer to the city2 and train maps and see how they did it.
-Paril
|
|
Whirlingdervish
Clan Q2C
100%
Clan Q2C Resident Smartass BANNED FOR STALKING AND FLAMING
Posts: 962
|
Post by Whirlingdervish on Jun 26, 2008 13:29:38 GMT -5
you could also use two relays and a func_timer to control the target_blaster entity. this will allow you to turn on the blaster using a button for a given period of time during which it will shoot and then stop and be ready to shoot again: first make two trigger_relays and give them the same targetname value of "shoot01" and a target value of "timer01" on one of those relays, set a key/value pair of "delay 3" on it. now make a func_timer with a targetname of "timer01" and a target of "blaster01" set the wait value on the func_timer to "0.001" next, make your target_blaster entity, set the direction, and set the speed to "3000" and the targetname to "blaster01" now you make a button with a wait value of "3" to make sure it can't be turned on again until the blaster stops shooting, and set it's target value to the targetname of the relays "shoot01". your button will turn both relays on at the same time but the relay with the delay wont fire until that delay time is up. this will, in effect, turn on the timer and then turn if off 3 seconds later to stop it from triggering the blaster to shoot repeatedly. to achieve a given number of blasts before the blaster stops shooting, change the speed value on the target blaster entity to a higher or lower value to adjust how many times it shoots during the span of time that it is on. (you can also change the 3 second delay on the button and relays to acheive a shorter duration of fire) if you want more than one shot firing simultaneously, make multiple target_blasters with the same targetname value. hope that helps
|
|
Mikemc
Quake 2 Mapping Club
Reminiscing this & that & having such a good time
Posts: 344
|
Post by Mikemc on Jun 26, 2008 21:17:56 GMT -5
I wasn't aware the timer could be switched on and off. That sounds exactly what I am looking for. Using 80 trigger_relays doesn't appeal to me - Mike
|
|