How can I make hazards? (sawblades/trains)

SpookyStan

L1: Registered
Feb 9, 2021
3
0
I am currently making a map and I need to add the spinning sawblades from koth_sawmill to my map. The only problem is, when I load them in, they don't spin, or kill players. How do I get them to work?
 

Box Of Paper

L3: Member
Jul 15, 2019
121
148
The reason it doesn't spin is probably because you didn't set the default animation to "idle", as for the hurting part you have to use a "trigger_hurt".

I've attached a .vmf containing the sawblade ripped straight out of sawmill.
Note that it moves thanks to a "func_movelinear" that is located at the sawblade's center.

Trains usually use "func_tracktrain" and "path_track"s, and the train model is parented to the func_tracktrain, again the hurting is done using a trigger_hurt.
 

Attachments

  • sawmill_sawblade.vmf
    10.2 KB · Views: 138

Box Of Paper

L3: Member
Jul 15, 2019
121
148
Two ways:
1) Open sawmill_sawblade first, Ctrl-C everything (use :selectiontool: and press enter to select everything), then open your map by (File > Open...) and Ctrl-V there.
You can deal with multiple maps open at the same time by minimizing the windows, the buttons are on the top right corner, note that they like to hide behind the "Messages" console.

2) By using Prefabs, a bit more complicated but it allows you to quickly acces the prefab for future uses:
Go to: " C:\Program Files (x86)\Steam\steamapps\common\Team Fortress 2\bin\Prefabs " or wherever you put your game, and drop "sawmill_sawblade" there.
Then to actually use Prefabs click the Entity Tool :entitytool: , then on the right select the category "Prefabs", and as Object "sawmill_sawblade".

Now you'll place the sawblade wherever you click, just remember to reselect the "Entities" category if you want to use entities again.