Updated VScript : Basic Entity Code Tutorial (markdown)

Blixibon 2020-05-29 11:54:32 -05:00
parent b3e1d6ffe6
commit 73534ac7ed

@ -79,6 +79,8 @@ To make sure `wyatt` actually points to an entity, we use an `if` statement:
if (wyatt != null)
```
This `if` statement is "true" if `wyatt` is not `null`.
Similar to the function, an `if` statement could have its own code which only runs if the statement is true. They can be enclosed with `{` and `}`. In the function itself, it would look like this:
```squirrel
@ -94,7 +96,7 @@ function SetPlayerHealthToNPC()
Now that we know `wyatt` is an entity which exists, we can get its health.
First, we'll add a new variable called `health`:
First, we'll add a new variable called "health":
```squirrel
local health