How to setup an obj to be replaced by a 2nd when...

javierdl

2009-12-28 20:11:49

the player uses the action key (e). For example, a burger. When the player hits e, the burger is replaced by an eaten counterpart.

So far I know how to and have successfully created an object and imported it into HL2DM, so you don't have to explain that, only the additional parts to add the second mesh and set it up to work with the e key.

Thanks in advance guys,

JDL

Image

javierdl

2009-12-30 18:55:47

This is what Xanoratt advised:

"Make your first burger a prop_dynamic. Put a block of tools/invisible over it and make the block into a func_button. Then make the second model a prop_dynamic and put it in the same spot (you may want to keep it seperate in order to work with it first). Make a logic_auto and set its OnMapSpawn output to perform TurnOff on the second burger. Set the func_button's OnPress output to perform TurnOff on the first burger, and TurnOn on the second burger.
Tools/invisible" is a solid invisible material. I recommended it because you need a solid object for the button, but don't want to have to see it. You do all of this stuff in Hammer. If you don't understand it then read up on Input & Outputs."

Image

{EE}chEmicalbuRn

2009-12-30 19:23:22