[SOLVED]Can you fizzle/Dissolve Turrets on demand?
Quote from The_Butler on September 12, 2012, 10:13 amI have a button in my map that when pressed (re) spawns a turret, using a env_entity_maker and point template.
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!
I have a button in my map that when pressed (re) spawns a turret, using a env_entity_maker and point template.
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!
Quote from wrathofmobius on September 12, 2012, 10:17 amI have an idea... not sure if it's the most efficient one. Just parent a trigger_portal_cleanser to the turret, set it to start deactivated, and activate it when you want the turret fizzled. Make sure to set the "Physics Objects" flag on the trigger_portal_cleanser and deactivate the "Clients" flag.
I have an idea... not sure if it's the most efficient one. Just parent a trigger_portal_cleanser to the turret, set it to start deactivated, and activate it when you want the turret fizzled. Make sure to set the "Physics Objects" flag on the trigger_portal_cleanser and deactivate the "Clients" flag.
[spoiler]WOM Test 1
Laser Cube Quest
Mho' Power - Community Spotlight!
Four Corners[/spoiler]
Quote from narsqrd on September 12, 2012, 2:11 pmThe strange thing is that turrets can fire an OnFizzled output; Hammer doesn't recognize it as valid, but it works when you throw a turret in a portal cleanser.
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
The strange thing is that turrets can fire an OnFizzled output; Hammer doesn't recognize it as valid, but it works when you throw a turret in a portal cleanser.
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
Quote from The_Butler on September 12, 2012, 2:14 pminteresting idea, I tried it and it seems at first glance that the trigger_portal_cleanser does not want to be parented to the turret. e.g. if I leave the turret where it is the fizzle action works fine, if I move the turret the invisible cleanser does not move with it. I then tried using a normal brush with texture and parented that to the turret, and this did follow the turret around... its all a bit weird really... but I will run some more tests..
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!
interesting idea, I tried it and it seems at first glance that the trigger_portal_cleanser does not want to be parented to the turret. e.g. if I leave the turret where it is the fizzle action works fine, if I move the turret the invisible cleanser does not move with it. I then tried using a normal brush with texture and parented that to the turret, and this did follow the turret around... its all a bit weird really... but I will run some more tests..
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!

Quote from josepezdj on September 13, 2012, 4:21 amWhat you're trying to accomplish reminds me of how Valve set up their cube droppers: a cube falls through a corridor and after touching a trigger, that cube is "marked" to be destroyed later (on demand)...
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
What you're trying to accomplish reminds me of how Valve set up their cube droppers: a cube falls through a corridor and after touching a trigger, that cube is "marked" to be destroyed later (on demand)...
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
Quote from HMW on September 13, 2012, 9:08 amI had a problem similar to this before. It seems that triggers don't work on their parent.
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.)
I had a problem similar to this before. It seems that triggers don't work on their parent.
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.)
Other Portal 2 maps: Medusa Glare
Portal 1 maps: Try Anything Twice | Manic Mechanic
Quote from The_Butler on September 13, 2012, 1:56 pmHabzs 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!
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!
Quote from Habzs on September 13, 2012, 8:12 pmThe_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.
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.
Quote from protoborg on September 13, 2012, 10:08 pmyou could simply have a large brush that encompasses the entire area where the turrets will be during play. That brush would be set to kill the turret. Basically, you are creating a large brush based fizzler. You can set it up to only fizzle certain objects. That way you don't have to muck about with parenting stuff.
you could simply have a large brush that encompasses the entire area where the turrets will be during play. That brush would be set to kill the turret. Basically, you are creating a large brush based fizzler. You can set it up to only fizzle certain objects. That way you don't have to muck about with parenting stuff.