animating prop doors

wbuilder

L1: Registered
Sep 7, 2014
34
0
can someone link me to an tutorial on how to animate prop doors. i checked valves website but the thread there was a tad bit too vague.
thanks.

-wbuilder
 

MaccyF

Notoriously Unreliable
aa
Mar 27, 2015
914
1,545

wbuilder

L1: Registered
Sep 7, 2014
34
0
so if i understand correctly this makes it so when a player walks up to the door it will play the animation and open. thanks! but how to get the trigger to associate with the prop?
 

MaccyF

Notoriously Unreliable
aa
Mar 27, 2015
914
1,545
ok hang on, before i go into any more detail do you want to trigger a props inbuilt animation, or do you want just a simple sliding door? (Its the difference between the one that rolls up and back or the one that disappear into the door-frame)

The second option is more simple and more reliable
 

wbuilder

L1: Registered
Sep 7, 2014
34
0
i am using the door that has two parts that slide back into the frame but its a prop so i need to know how to get it to trigger and animate it
 
Last edited:

MaccyF

Notoriously Unreliable
aa
Mar 27, 2015
914
1,545
  • Create a prop_static using the entity tool, and set "model" to "props_gameplay/door_grate001_frame.mdl"
  • Create a prop_static with "model" set to "props_gameplay/door_grate001_floorplate.mdl"

Once they're positioned they provide the door's frame.


  • Create a prop_dynamic and set "model" to "props_gameplay/door_grate001_top.mdl", "disable shadows" set to "yes", "name" set to "door1_prop_top", "parent" to "door1_door_top" and "collisions" set to "not solid".
  • Copy the prop_dynamic to below the first (shift+drag it on the 2d views). Change the copied prop's "model" to "props_gameplay/door_grate_001_bottom.mdl", "parent" to "door1_door_bottom" and it's "name" to "door1_prop_bottom".

Align these inside the door frame, they form the visible moving part of the door.

  • Create a brush with the texture metal/imetal001b the same size as the top grate's model, then press Ctrl+T and select func_door in the drop-down menu.
  • Set "name" to "door1_door_top", "render mode" to "don't render", "disable receiving shadows" to "yes", "disable shadows" to "yes", "speed" to "400", "delay before reset" to "-1" and "move direction" to "up"
  • In the func_door's "flags" tab, uncheck "touch opens"
  • Copy this func door to cover the bottom grate's model, and change it's "name" to "door1_door_bottom", and it's "move direction" to "down".

These func_doors are the entities that cause the prop_dynamics to move, make sure they're positioned over the door grates.

  • Create a team_round_timer and set "start paused" to "no", "setup timer length" to "60", and "reset timer on round restart" to "yes".
  • In the team_round_timer's "outputs" tab, add an output with
    "OnSetupFinished", "door1_door_top", "Open".
  • Copy this output and change "Target Entity" to "Door1_door_bottom"

You should now have a door that opens at the end of your setup time, which is 60 seconds long




If you wanted a door that opened when you got close to it rather than on the end of setup time, you don't need the team_round_timer, Instead;

  • create a brush textured with tools/toolstrigger covering the area you want the door to open for a player in.
  • Press Ctrl+T and select "trigger_multiple" in the drop-down list.
  • Set "delay before reset" to "0"
  • Open the trigger's "outputs" tab and add
    "OnStartTouchAll", "Door1_door_top", "Open"
    "OnStartTouchAll", "Door1_door_bottom", "Open"
    "OnEndTouchAll", "Door1_door_top", "Close"
    "OnEndTouchAll", "Door1_door_bottom", "Close"


I hope that helps, If you need anything clarifying, just ask :woot: