mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-05-16 08:38:10 +03:00
Updated VScript : Basic Entity Code Tutorial (markdown)
parent
a92cbe8491
commit
a579b9f758
@ -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 SP games, like Half-Life 2.
|
||||
In entity scripts, there's always a variable called `player` which refers to the player. It can only be used in single-player mods.
|
||||
|
||||
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