jump.tf Forums
Welcome B)

[TUTORIAL] Disable fall damage on a map

Zeq · 6 · 2555

Zeq

  • Novice
  • **
    • Posts: 50
    • Frags: +0/-0
    • View Profile
I have had a few people ask me how to disable the fall damage on a map so I am posting the solution here.
  • First create your info_player_teamspawn.
  • Then place a point entity called filter_damage_type anywhere you like and change these settings:
    • Name: filter_damage_fall
    • Filter mode: Disallow
    • Damage type: FALL
  • Next, create a trigger around your info_player_teamspawn and make it a trigger_multiple and change this setting:
    • Delay Before Reset: 0
  • Finally, create an output on the trigger_multiple and set it to this:
    • OnStartTouch | !activator | SetDamageFilter | filter_damage_fall | 0.00
Some things like "!activator" and "SetDamageFilter" will probably show up as red but will work anyway. Also make sure that the "Clients" flag is ticked in the trigger_multiple, it should be by default though.

Now whenever a player spawns in the map they will touch the trigger_multiple, which in turn will assign the damage filter filter_damage_fall to the player. This filter will only allow any damage type that isn't fall damage.

I am not sure how this works with plugins that save your location on the map between sessions. The player should however always spawn at the info_player_teamspawn, trigger the damage filter, and then be teleported to their saved location. If you notice that this still doesn't work you can simply make the trigger_multiple so big that it covers the entire map. That way the player will always trigger it even if the player is teleported when spawned.

Download link to prefab: https://dl.dropboxusercontent.com/u/5887746/Source%20SDK/sdk_filter_falldamage.rar


Emmet

  • Newbie
  • *
    • Posts: 39
    • Frags: +0/-0
  • Master Builder
    • View Profile

Zeq

  • Novice
  • **
    • Posts: 50
    • Frags: +0/-0
    • View Profile
Don't trigger hurts have a FALL damage type?

Yeah they do. I suppose this would make players immune to those triggers. You could also filter things like BURN to make players immune to the pyro flamethrower, or BULLET to block hit-scan weapons like the shotgun.



Oatmeal

  • Proficient
  • ****
    • Posts: 283
    • Frags: +0/-0
    • View Profile
So it doesn't matter when the player walks through this right? I could put it at the start of a sync jump and it would work?


Zeq

  • Novice
  • **
    • Posts: 50
    • Frags: +0/-0
    • View Profile
So it doesn't matter when the player walks through this right? I could put it at the start of a sync jump and it would work?

Yeah you can put it anywhere you like. The filter will stay applied to the player until the player is killed or changes classes for example. Putting it around the spawn just ensures that it stays with the player for the whole map.