Exploits
"We're still not sure what that does."
|
This page documents some well-known and little-known tricks that might break your maps.
Tip: Perhaps instead of limiting players, consider using this information to hide an easter egg or something like that. Definitely don't expect them to know about these things! Also consider the fact that some things may diminish the game's perceived realism, or simply be met with confusion as something doesn't behave exactly how players are used to it working.
General[edit | edit source]
- By mashing the jump and use buttons, physics objects can be used to climb walls, or even to fly in midair.
Demonstration. Portal 2 fixes this issue by implementing a long cooldown on +use
, and making objects non-solid when held by the player.
- Water cancels fall damage.
If you can't alter code, a possible solution is to use trigger_hurt
s. Appropriate damage amounts depend on the height of the fall and the depth of the water. Unless the height of the fall would kill the player instantly, use an OnHurt
output to disable the trigger after hurting the player once, and also add necessary logic to disable the trigger if the water is approachable by a safer route, and to enable it again when the player reaches a dangerous height. Clearly this can quickly become very complex.
Versions of Source with VScript could possibly control the damage of the trigger based directly on the player's Z speed.
For coders, open gamemovement.cpp and look for this where CheckFalling()
is defined:
3910 if ( player->GetWaterLevel() > 0 )
3911 {
3912 // They landed in water.
3913 }
Delete it entirely, and also remove the else statement below it (not the code inside it, just the else{}
).
Half-Life 2[edit | edit source]
Vehicles[edit | edit source]
- When punted the right way with the gravity gun, the buggy and airboat may send a player flying very high up.
This can be a major issue when your level design is vertical, and could also allow the player to jump or shoot over some obstacles. Falling from heights like this can do major fall damage, but see above about water. Damage can also be alleviated by entering the vehicle before hitting the ground, or landing the right way on a slope. Possible fixes are simply designing your maps to accompany for this, clipping, or making vehicles less jumpy, possibly by increasing their mass in scripts\vehicles\
. (This can also affect acceleration and jumping abilities, so don't increase it too much.)
- The airboat's shape makes it a very quick and useful ramp.
The best fix for this is simply to design your map to accompany that height (about 200 units, including jumping and crouching). You can also use player clips, but be careful as it might diminish realism.
- The airboat is rather light. It is very easy to push out of reach with the gravity gun.
With the vehicle out of reach, a player would have to load from a previous save, or possibly start over an entire chapter. Increase the airboat's mass in scripts\vehicles\
. You can also use clip brushes, but be careful as it might diminish realism. An extra smart player could also punt the airboat and then press the use key to enter it before it leaves their reach, which can give them a huge advantage.
- Standing on a large vehicle outsmarts some NPCs, especially ones that cannot use bullets or other projectiles.
NPCs do not consider vehicles to be ground that can be stood on, meaning the player is out of their reach.
To do: Solutions? There's probably a reason vehicles and NPCs don't like to touch.
- When a player enters a vehicle, they aren't actually sliding into the vehicle how it appears. They are teleported straight to the final camera destination. This allows a poorly-placed trigger to skipped, also known as Enter Clipping.
Unless your trigger needs to be a very specific size, just make the trigger larger, or have it detect vehicles too.
Weapons[edit | edit source]
- The force of explosions created by weapons can boost players. (Like rocket jumping in Team Fortress 2.)
Explosions that are forceful enough to propel the player significantly are also pretty damaging to them, so repeated uses aren't very doable. Design your maps to account for the possible distances. You can also use player clips, but be careful as it might diminish realism.
- Players can stand on physics objects, punt them downwards with the gravity gun, and be propelled upward.
This is probably preventable by having moving objects ignore the gravity gun when a player is standing on them. If you cannot alter code in your situation, careful level design is the next best bet.
Not every prop is as equally exploitable. Here are some HL2 props known to boost particularly well:
- QPhysics NPCs that can be moved via the gravity gun can be used to clear medium to large gaps if the player stands on one, and jumps at the same time as they punt the NPC.
This only concerns headcrabs and antlions. This can probably be fixed similar to the last issue, by having NPCs ignore the gravity gun when a player is standing on them. A better solution might be to simply make the player not take inertia from NPCs/objects they stand on. To do: How do you do that? Also which method really is best?
- NPCs such as striders, helicopters, and gunships can be hurt by more than just rockets. A player killing one of these in an unintended time and place can have unwanted consequences depending on the situation.
This isn't really a bug, in fact Valve intended this. Any of these can be used to hurt large enemies:
- Frag grenades (which can be aided by the gravity gun)
- SMG grenades
- Any Combine energy ball (also aimable with the gravity gun)
Problems with this aren't usually encountered in Half-Life 2 because Valve accounted for it as best as possible, but imagine how this could have affected gameplay on d3_c17_12b
and d3_c17_13
, where progression relies heavily on strider NPCs dying and using scripted cannon shots. If Valve did not consider the possibility of a player killing a strider before reaching the place they want the player to go, the player could potentially be trapped.
Avoid this by ensuring the player doesn't have those options (probably through scarcity), or simply plan for the possibility.
Water[edit | edit source]
- Some coast maps have a sweet spot in the water where antlions can't go without drowning, but leeches are still farther out in the water.
This makes it easy for a player to travel without a vehicle, and take virtually no damage. To prevent this, keep all water shallower than 32 units, (the maximum water level an antlion can move in) and extend your trigger_waterydeath
to anywhere deeper than that. This solution isn't 100% effective. Antlions usually won't go directly at the player, and they can't change trajectory once they begin flying (for players that duck or suddenly change speed). 32 units is also unusually shallow water for leeches to swim in. A code-based solution would be to let antlions go deeper in water, but this may look odd.
- A poorly placed
trigger_waterydeath
can be swum over.
- A poorly placed
This is an issue in Half-Life 2: Lost Coast. In this map, the trigger is placed slightly below the surface. If the player jumps and crouches at the surface of the water, they can continuously jump in and out of the trigger before they get hurt, enabling the player to access areas of the map they shouldn't be in.
This is not an issue in any Half-Life 2 maps, as the triggers in those maps actually go a long way above the surface, too.
Portal Series[edit | edit source]
Portals[edit | edit source]
- When a portal is shot somewhere currently containing a different portal, the first portal is usually placed to the side of that other one. This can happen even through barriers, such as glass.
Put a func_portal_bumper
on the barrier to prevent portal bumping. Also try using func_noportal_volume
and sv_portal_placement_never_bump 1
.
- In Portal 1, portal shots take time to travel. In that amount of time, the player can cross through a portal before the shot lands on another wall.
Demonstration Portal 2 fixes this problem by making portals be placed instantly when the gun fires. Portal 2 has a similar issue, but it requires more precise timing, and the camera's orientation has to change when crossing the portal. The Portal 2 iteration of this bug isn't possible to fix map-side.
Gel[edit | edit source]
See also: Controlling gel
- When a player collides with a cube, it can cause them to be nudged upward. When repulsion gel is added to the equation, it lets the player reach any height, due to repulsion gel not simulating a terminal velocity.
Demonstration There's not much of a way to stop this except for using a trigger_push
, however odd that may look.
- When a player crouches on propulsion gel, moves forward, and uncrouches, they will instantly accelerate to the maximum gel speed.
Situations where this is a problem are rare. It's best to just adjust the dimensions of the map a little if it's an issue.
- When a player throws a cube while running on propulsion gel, the cube's velocity is magnified greatly, including upward.
This just means that they can throw a cube really high, and really far. This is rarely a problem
Excursion Funnels[edit | edit source]
- Due to some crouch status issue, an excursion funnel can be used to trick the game into letting the player fly freely.
Probably not fixable. This bugged state can be preserved across map loads. See this page for more information.
Team Fortress 2[edit | edit source]
Spawnrooms[edit | edit source]
- Line of sight to enemies appears to influence the validity of
info_player_teamspawn
s.
- Line of sight to enemies appears to influence the validity of
If a player can see an enemy spawnpoint, the game seems to try to avoid spawning a player at that spot. This is a good thing, because it would be rather unfair to the spawning player. It could, in very certain circumstances, be abused to make players spawn in worse spots. Change your spawn layout if this is abused (very unlikely).