Bullet Sensor


([rD]MrPink) #1

I know its possible to have a trigger_multiple get trigger by a person touching it, but is it possible to have something trigger by bullets touching?


(damocles) #2

It can be done, but requires scripting the death and rebirth of a func_explosive or perhaps a func_constructible.


(Dark Killer) #3

im not sure about this but if you add function button and put health key in it, it should work as a shootable trigger, not sure though :slight_smile:


([rD]MrPink) #4

func_button doesn’t exist in ET, although I wish it did :disgust:


(Erik-Ftn) #5

Did u get the bulletsensor to work? After some serious :banghead: :banghead: :angry: :banghead: finally I found one way of doing it. :moo: :moo: :clap: :drink: :moo: :moo: :moo:

Make a script_mover:
spawnflags: solid, ressurectible
health 1
scriptname bulletsensor
targetname bulletsensor_targetname

Shooting or nading it will trigger its death in its scriptroutine.

bulletsensor
{
	death
 	{
		  // you might want a wait here
		  // Your desired action. I set of a target_effect
		  // sending a triggersignal to the targetname of the damaged ressurectible script_mover will... ressurect it

		 wait 100 
 		 alertentity smoke   
		 alertentity bulletsensor_targetname
 	}
}

Note:

If its not solid it will not detect bullets, just explosions. Maybe you could experiment with different clippings to get a shoot-through sensor (probably not), and I guess it does not work like throwing a nade though a window, in spite of the low health.


I also have a few questions here:

  1. How to/ Can I respawn a func_explosive after its blown?

  2. Can func_explosives trigger its routines death like the manual says? Can it trigger any scripting whatsoever with it, without a target_script_trigger?