Teleporting Trains, and Health Bars

FyreDay

L1: Registered
Apr 17, 2016
13
0
I am working on a map where blue team is pushing a cart but red can destroy the payload to reset it. I am stuck where I cant get a few things to work.

1. How can I add a health bar? Can I just use func_tanktrain and set the health? or is it more complex?

2. How can I teleport an entity like func_tanktrain or func_tracktrain?

3. How does cp_snowplow's hud health bar work? I would like to add something like it to my map.

Thanks!
 
Mar 23, 2013
1,013
347
a point_teleport can teleport an entity to its position. However when using trains you can teleport it to the next path_track by checking a flag in the path_track entity.

You could make a healthbar similar to snowplow with screenoverlays. The screenoverlay entity displays a texture on the player's screen so it can't be an acurate healthbar unless you use a shitton of textures. But using only ten textures to display the next overlay ever 10% of health is taking is acurate enough.

A func_breakable can send outputs depending on how much % of its health is left. check the wiki for the command.
However you should know that breakable entities generaly don't work too great for the default modes of tf2. Lazzer and flamethrower weapons can't harm func_breakables, grenades don't explode on impact, stickies won't stick and some projectiles like arrows can't damage it either.
 

FyreDay

L1: Registered
Apr 17, 2016
13
0
a point_teleport can teleport an entity to its position. However when using trains you can teleport it to the next path_track by checking a flag in the path_track entity.

You could make a healthbar similar to snowplow with screenoverlays. The screenoverlay entity displays a texture on the player's screen so it can't be an acurate healthbar unless you use a shitton of textures. But using only ten textures to display the next overlay ever 10% of health is taking is acurate enough.

A func_breakable can send outputs depending on how much % of its health is left. check the wiki for the command.
However you should know that breakable entities generaly don't work too great for the default modes of tf2. Lazzer and flamethrower weapons can't harm func_breakables, grenades don't explode on impact, stickies won't stick and some projectiles like arrows can't damage it either.
Am I correct in assuming its impossible to create an mvm tank without using the population files and a complete mvm map?
 

Yabayabayaba

L5: Dapper Member
Jun 2, 2016
243
77
there is an entity tank_boss, but it may cause issues, use with caution. And you can filter damage types using a certain entity, but I am not sure which.