How to do "fancy" hazards?

creevlo

L1: Registered
Jun 10, 2020
18
1
I'm working on something and i couldnt find the answer to this question on the internet so I'm asking here. How can you make fancy hazards (moving saw blades, grinder gear pits, etc.)?
 

Yaki

aa
Sep 3, 2018
418
256
Saw blades are usually a combination of a "trigger_hurt" parented to a "func_door". You could make it more visually appealing by adding sounds (called "ambient_generic") and changing the skin of the saw blade to a bloody one when the "trigger_hurt" is activated (using "OnStartTouch").

I assume you've followed Crash's "How-to" series? They are essential here.

I can help walk you through this, if you like.
 

creevlo

L1: Registered
Jun 10, 2020
18
1
Alright so I got the detail parts of this sawblade thing working, but I'm still a bit unsure of how to make it move back and forth? You said with a combination of a func_door and a trigger_hurt but how would I incorporate the func_door so that it would make the blade move?
 

creevlo

L1: Registered
Jun 10, 2020
18
1
I've tried looking at the decompiled sawmill, but I can't find anything that causes it to move
 

Yaki

aa
Sep 3, 2018
418
256
OK, I found out that sawmill uses a func_movelinear. Apparently it uses less memory in-game compared to func_door, so that's a big plus! :)

The brush is inside the prop itself. Check it out!
func_movelinear.png