Please or Register to create posts and topics.

Panel falling after animation

Hi! I'm trying to get a wall panel to drop once the panel arm's animation is complete. Basically what I'm trying to do is that once the player triggers the output, the panel follows the panel arm's animation till it gets into place. Once the panel is in it's place I want to clear the parent so that the panel can drop from the panel arm.

I've tried working with func_physbox but I can't seem to make it work. Do you know how to help me, or at least redirect me to a official map so I can see how the devs have made it (I can't come up with any map that does this, right now)? Thanks in advance!

This could be a pretty harsh solution, but works if nothing else does.

Create a func_brush and attach it to the panel arm. Then create an identical func_physbox, tick the "disable motion" flag on it and disable the physbox itself on spawn, then place it at the ending position of the original panel brush.

The trick is to kill/disable the panel brush after the animation is done and enable the physbox at the same time so that it would spawn the very same looking panel at the same place at the same time the brush is killed seamlessly replacing it. Then just enable physbox's motion whenever you feel like it should fall off the panel.

This is a pretty dirty solution in my opinion, but if nothing else works - might as well go for it.

I know what you mean and I will give it a try. The problem is that I don't really understand, or at least get the func_physbox different commands to work the way I wish. Do you know of any good guide that would cover something like my request? I checked VDC for more information but didn't find anything that covers more than I already can see in Hammer.

Konke wrote:
I know what you mean and I will give it a try. The problem is that I don't really understand, or at least get the func_physbox different commands to work the way I wish. Do you know of any good guide that would cover something like my request? I checked VDC for more information but didn't find anything that covers more than I already can see in Hammer.

Consult the Valve Developer func_physbox page to learn more about it.

What you actually want is a phys_convert. This transforms the specified entity into a physics object when triggered. (prop_physics or func_physbox, depending on entity type).

Prop_dynamics have a OnAnimationDone output which you might want to use to time the conversion. Alternately, in the prop_dynamic properties switch to the model tab, and then choose your animation there. That way you can drag the slider to figure out how many frames the animation has. Divide that number by 24 to get the number of seconds the animation plays.

You might want to also use an env_physexplosion to give the panel an invisible nudge to make it look like it's being flung away. Set it to only affect the func_brush (so it doesn't affect nearby cubes or the like). Output-wise, you want to ClearParent the brush, trigger the phys_convert, and then Explode the env_physexplosion with a 0.01 second delay between each output. You might also want to use a func_clip_vsphyics brush running along one edge of the panel (a few units below, sticking out about 1 unit) for the panel to bounce off of and make it rotate. Put the physexplosion off-center as well, to make the spin of the panel more random.

My stuff:
[spoiler]- BEE2 Addons | (BEE2)
- Hammer Addons
Maps:
- Crushed Gel
- Gel is Not Always Helpful[/spoiler]
TeamSpen210 wrote:
What you actually want is a phys_convert. This transforms the specified entity into a physics object when triggered. (prop_physics or func_physbox, depending on entity type).

Prop_dynamics have a OnAnimationDone output which you might want to use to time the conversion. Alternately, in the prop_dynamic properties switch to the model tab, and then choose your animation there. That way you can drag the slider to figure out how many frames the animation has. Divide that number by 24 to get the number of seconds the animation plays.

You might want to also use an env_physexplosion to give the panel an invisible nudge to make it look like it's being flung away. Set it to only affect the func_brush (so it doesn't affect nearby cubes or the like). Output-wise, you want to ClearParent the brush, trigger the phys_convert, and then Explode the env_physexplosion with a 0.01 second delay between each output. You might also want to use a func_clip_vsphyics brush running along one edge of the panel (a few units below, sticking out about 1 unit) for the panel to bounce off of and make it rotate. Put the physexplosion off-center as well, to make the spin of the panel more random.

Thanks! I will surly check it out!