Garry's Mod Wiki

physenv.AddSurfaceData

physenv.AddSurfaceData( string properties )

Description

Adds surface properties to the game's physics environment.

The game has a limit of 128 surface properties - this includes properties loaded automatically from surfaceproperties.txt. Due to this, there's only a small amount of open slots that can be registered with GMod's provided surfaceproperties.txt.

Arguments

1 string properties
The properties to add. Each one should include "base" or the game will crash due to some values being missing.

Example

Adds the "" surface property from TF2.

physenv.AddSurfaceData(<page>"scout_baseball" { "base" "rubber" "bulletimpact" "Weapon_Baseball.HitWorld" "scraperough" "Grenade.ScrapeRough" "scrapesmooth" "Grenade.ScrapeSmooth" "impacthard" "Weapon_Baseball.HitWorld" "impactsoft" "Weapon_Baseball.HitWorld" "rolling" "Grenade.Roll" }</page>)

Page Links


Special Pages


Wikis

?

Render Time: 28ms

DB GetPage 4
Generate Html 2
SaveChanges (1) 8
Render Body 0
Render Sidebar 12