Wall Climbing 2023-05-22
Wall Climbing from VSH-VScript as a standalone thing
Wall Climbing from VSH-VScript as a standalone thing!
Easy to install, somewhat flexible and designed to co-exist with other vscript creations on the same map, which is far from a given.
1)Put
2)Add
There's 3 options to determine which players should be allowed to Wall Climb.
Uncomment which option you like the most.
The first and default options allows all players to Wall Climb at any time.
The second option is "insert your code instead". An example above is a team filter.
The third option uses a dynamic list of arbitrary players capable of Wall Climbing.
To grant/revoke the Wall Climb ability with the third option, use the following HammerIO outputs:
This vscript uses a quirk that enables OnTakeDamage event for
If by some odd chance you want worldspawn's OnTakeDamage event to be fired for other vscripts, set
If you like my work, you can support me at https://boosty.to/lizardofoz. With enough support, I'll be able to put more time into projects like these.
Easy to install, somewhat flexible and designed to co-exist with other vscript creations on the same map, which is far from a given.
1)Put
melee_wall_climb.nut
into tf/custom/<any_name>/scripts/vscripts/
.2)Add
logic_script
entity into your map with the following propertiesThis is it! (all values are case-sensitive)
There's 3 options to determine which players should be allowed to Wall Climb.
Uncomment which option you like the most.
Code:
function IsEligiblePlayer(player)
{
return true; //Option 1
// return player.GetTeam() == Constants.ETFTeam.TF_TEAM_BLUE; //Option 2
// return player in eligiblePlayers; //Option 3
}
The second option is "insert your code instead". An example above is a team filter.
The third option uses a dynamic list of arbitrary players capable of Wall Climbing.
To grant/revoke the Wall Climb ability with the third option, use the following HammerIO outputs:
logic_script_wall_climb
here is the name of your logic_script
entity.This vscript uses a quirk that enables OnTakeDamage event for
worldspawn#0
, which is how a melee hit gets detected, but then we add a hijack-proxy so that OnTakeDamage event of other vscripts wouldn't trigger when, for example, shooting at a wall.If by some odd chance you want worldspawn's OnTakeDamage event to be fired for other vscripts, set
supressWorldSpawnDamage
to false.If you like my work, you can support me at https://boosty.to/lizardofoz. With enough support, I'll be able to put more time into projects like these.
- License
- Credit is required. Permission to modify optional.