Updated VScript : Basic Entity Code Tutorial (markdown)

Blixibon 2020-05-29 13:13:26 -05:00
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)`: