mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-04-12 04:30:08 +03:00
Updated VScript : Basic Entity Code Tutorial (markdown)
parent
a579b9f758
commit
b24ba3beee
@ -126,7 +126,7 @@ function SetPlayerHealthToNPC()
|
||||
|
||||
Now it's time to set the player's health to this value. This is done in a similar fashion to getting wyatt's health.
|
||||
|
||||
In entity scripts, there's always a variable called `player` which refers to the player. It can only be used in single-player mods.
|
||||
In entity scripts, there's always a variable called `player` which refers to the player. It can only be used in single-player games.
|
||||
|
||||
To set the player's health to our new `health` variable, we just use `player` followed by `.SetHealth(health)`:
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user