s&
newspaper
About
info
About s&box
newspaper
Latest News
published_with_changes
Changes
map
Roadmap
monitoring
Metrics
games
Games
sports_esports
Browse Games
rocket
Discover Games
business_center
Workshop
sports_esports
Games
landscape
Maps
chair
Models
texture
Materials
apparel
Clothing
construction
More..
forum
Forum
docs
Docs
docs
Documentation
dashboard
Api Reference
school
Tutorials
input
Log in with Steam
chevron_left
Change Language
简体中文
English
Русский
Español
Português-Brasil
Deutsch
日本語
Français
Polski
Türkçe
한국어
Pirate
Italiano
ไทย
繁體中文
Українська
Čeština
Nederlands
Magyar
Dansk
Suomi
Svenska
Norsk
Ελληνικά
Română
Български
Tiếng Việt
Bahasa Indonesia
Español-Latinoamérica
العربية
Api
Classes
DamageInfo
chevron_left
Classes
class
DamageInfo
search
Constructors
functions
DamageInfo
Properties
data_object
Attacker
data_object
Damage
data_object
Hitbox
remove_circle
IsExplosion
data_object
Origin
data_object
Position
data_object
Shape
data_object
Tags
data_object
Weapon
DamageInfo
Describes the damage that should be done to something. This is purposefully a class so it can be derived from, allowing games to create their own special types of damage, while not having to create a whole new system.
class
Sandbox
.
Sandbox.Engine
build
Constructors
1
DamageInfo
(
)
data_object
Properties
9
Attacker
GameObject
Usually a player or Npc
Damage
float
Amount of damage this should do
Hitbox
Hitbox
The hitbox that we hit (if any)
IsExplosion
obsolete
bool
True if this is explosive damage
Origin
Vector3
The origin of the damage. For bullets this would be the shooter's eye position. For explosions, this would be the center of the exposion.
Position
Vector3
The location of the damage on the hit object.
Shape
PhysicsShape
The physics shape that we hit (if any)
Tags
TagSet
Tags for this damage, allows you to enter and read different damage types etc
Weapon
GameObject
The weapon that did the damage, or a vehicle etc
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.