mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-05-16 08:38:10 +03:00
Updated VScript : Basic I:O Tutorial (markdown)
parent
ca22925581
commit
dcfc2652d7
@ -1,7 +1,3 @@
|
||||
This article is meant to make VScript in Mapbase easy to understand if you've used logic entities and/or set up sourcemods before, particularly for Half-Life 2/Source SDK 2013. Prior coding experience is not required.
|
||||
|
||||
---
|
||||
|
||||
VScripts are a lot like the I/O system. Each entity can have its own scripts (similar to outputs) and these scripts can be influenced by inputs.
|
||||
|
||||
For this tutorial, we'll create a simple script which fires the `SetHealth` input on the player with a parameter of `85`, which sets the player's health to 85. In the I/O system, this can be done directly from an output. In-game, this can be done with the `ent_fire` command. This tutorial will tell you how this can be done in VScript.
|
||||
@ -12,9 +8,7 @@ For this tutorial, we'll create a simple script which fires the `SetHealth` inpu
|
||||
|
||||
First, go to the `scripts/vscripts` directory of your mod. If that directory does not exist, create it.
|
||||
|
||||
Inside of the `scripts/vscripts` directory, create a `.txt` file. You can name it anything you want, like `test_script`. It should not have any spaces.
|
||||
|
||||
Replace the `.txt` extension with `.nut`.
|
||||
Inside of the `scripts/vscripts` directory, create a `.txt` file and change its extension to `.nut`. You can name it anything you want, like `test_script`. It should not have any spaces.
|
||||
|
||||
Open the file using Notepad, Notepad++, or any other text editor.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user