#How do i make a wall that can break into chunks only when damaged by a explosion?

1 messages · Page 1 of 1 (latest)

tepid path
#

I want to make a puzzle for my map where the player has to get explosive barrels in order to get through a wall

crimson raft
#

I think func breakable has a breakable only by explosions flag

tepid path
#

yeah but what about physbox

#

so it breaks into cunks

#

chunks

crimson raft
#

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

tepid path
#

Oh ok

#

Ill try

violet stream
#

i'd suggest a filter_damage_type if i didn't misunderstand

keen elk
#

physexplosion has a parameter

Limit to Entity (targetentityname) <targetname>
If specified, the explosion will only affect the matching entity.

tepid path
#

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

violet stream
#

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

keen elk
#

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