mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-05-16 16:48:08 +03:00
Updated VScript : Basic Entity Code Tutorial (markdown)
parent
6f249ca97a
commit
b3e1d6ffe6
@ -1,6 +1,6 @@
|
||||
VScripts are a lot like the I/O system. Like how entities can take inputs, entities also have their own functions that could be "fired" in VScript.
|
||||
VScripts are a lot like the I/O system. Like how entities have their own inputs, entities also have their own functions that could be "fired" in VScript.
|
||||
|
||||
For this tutorial, we'll create a simple script which sets the player's health to the health of a NPC with the name "wyatt". In the I/O system, it would be difficult to get the health of an entity. You may have to use `logic_keyfield` or `logic_datadesc_accessor` *(both are Mapbase entities)* to get the entity's health. In VScript, this is much easier.
|
||||
For this tutorial, we'll create a simple script which sets the player's health to the health of a NPC named "wyatt". In the I/O system, it would be difficult to get the health of an entity. You may have to use `logic_keyfield` or `logic_datadesc_accessor` *(both are Mapbase entities)* to get the entity's health. In VScript, this is much easier.
|
||||
|
||||
---
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user