#How do i make a wall that can break into chunks only when damaged by a explosion?
1 messages · Page 1 of 1 (latest)
I think func breakable has a breakable only by explosions flag
oh
make the wall out of chunks, physbox
make it inactive gravity in the properties
then you could have the barrels output a trigger on damage which enables the gravity on the chunks
forgot to mention, a point_push will also be needed if you need the chunks to 'explode'
which would also need a ondamaged output from the barrels to the point push
i'd suggest a filter_damage_type if i didn't misunderstand
env_physexplosion might interest you
https://developer.valvesoftware.com/wiki/Env_physexplosion
@tepid path
point push is not an entity that exist in all game (csgo doesnt have it)
https://developer.valvesoftware.com/wiki/Point_push
and it affect even players (though through a flag), and any physic entity around so you cant really control it
physexplosion has a parameter
Limit to Entity (targetentityname) <targetname>
If specified, the explosion will only affect the matching entity.
so i just make the barrel trigger the push upon explosion
but how would i make it so it knows when to push, like what if the barrel is on the other side of the map and it explodes
you can filter the barrel with a filter_enemy and specify a radius in which the barrel needs to be to be valid
or actually it's easier, make a trigger brush around the area in which the barrel is close enough, and then check if the barrel is touching it, by enabling/disabling a logic_branch from OnStartTouch/OnEndTouch
there's probably an even easier or better way that i'm missing tho
there could be something near the wall, a func physbox, which is filtered to damage, only to your barrel name
so it would only be able to break through the barrel damage
and OnBreak, you then know that the barrel exploded close enough, so you can use the env phys explosion to push the wall away