[SOLVED]Can you fizzle/Dissolve Turrets on demand?
simple question, I need to re-spawn a turret in my map, and I would like to fizzle the old turret first when the new one enters the scene, just like what would happen with a cube dropper. Now I have been able to kill the turret but the "dissolve" option is not available to me... It just does not "work" properly in the map and I would like to change this, but have been unsuccessful...
I've been trawling through tutorials and this site as well, but not found anything concrete to help me... I know that Turrets can dissolve though, walking though a trigger_portal_cleanser doe the job (how does the trigger_portal_cleanser call the fizzle procedure anyway, surely some animations and the sound must be called - so it is already programmed / setup) please let me know if you have an idea.. and maybe a hint on where I could have found this information in the first place.
many thanks!
If you're going to make a trigger_portal_cleanser and parent it to the turret I would suggest adding a filter so that only turrets get dissolved (otherwise a cube next to the turret might become a casualty)
Another alternative is calling SelfDestruct or SelfDestructImmediately on the turret. It's not aesthetically the same as a fizzler dissolve, but personally I find it more satisfying
tnx for your comments narsqrd, I was already on the filtered outputs, but that is the least of my worries; I gave the cleanser fields a texture for testing, and it is hilarious to see what is going on. The first Turret that spawns will not fizzle, it refuses. Any subsequent turret has the ability to fizzle when in contact with the field. The best thing is though that all the fizzle fields are parented to the turret that does not want to die, I can pick up this turret and I have all these fizzle textures following it where ever it goes. So something is still amiss... weather it is a "rule" that a child cannot kill its parent (getting philosophical, at this time of night this can't bode well...) or is there something else going on... I might need to use thesee nifty console commands to see what name my NPC turret really has been given by the game, and why it won't fizzle when told to!
The idea would be to "mark" the spawned turret like so:
***OnTrigger > spawned_turret > AddOutput > OnUser1 !self:Kill::0:1 ***
(you could make a trigger filtered by name for example, right where the turret is spawned (where you have your env_entity_maker) and this way, every turret spawned will trigger it and will be marked)
Then, all that you have to do is fire the output FireUser1 whenever you need to kill your turret. If it's a button that kill it and then spawn another one, then use this settings for the button:
***OnPressed > spawned_turret > FireUser1 / delay 0:00
OnPressed > turret_maker > ForceSpawn / delay 0:25***
Call "ClearParent" on the trigger when you enable it, and see if that works.
(Also, to prevent unexpected fizzling of future turrets, remove (kill) the trigger after 0.1 seconds.)
Habzs wrote:
You could parent a brush to the turret and a trigger to the brush.
Nice one, this works! I must warn people that use this route that the brush should be tiny and should be slightly higher than the turret. Otherwise it will behave very odd at times when handling it.
I now need to fine-tune some logic behind the whole process but the main thing is achieved now
Cheers!
The_Butler wrote:
I must warn people that use this route that the brush should be tiny and should be slightly higher than the turret. Otherwise it will behave very odd at times when handling it.
Set the **Solidity** of the brush to Never Solid and texture it with a Nodraw texture.
That should fix the odd behavior when handling it.
Ontrigger Addoutput Turret1 OnPhysGunDrop ambient_generic1 Playsound:0:1
the turret in a specific spot will set the value of one logic_branch to 1.
later on, whatever even you want to happen will set the value of the other branch to 1.
the listener should be set so the branches are the ones you created. you should have the output in it:
Onalltrue - trigger event
onallfalse - disable event
onmixed - disable event
either way, i got it to work.