Left 4 Dead 2

Left 4 Dead 2

Speedrunner Tools
 Acest topic a fost fixat, deci probabil este important
シェイディ♑  [dezvoltator] 5 mai 2017 la 10:01
Customize Your Speedrun
Download Scripted Maps (ScMp) sample script here[drive.google.com] and put in the vscripts folder (Left 4 Dead 2/left4dead2/scripts/vscripts/vs_st_speedrun.nut). This file will be automatically executed after !restart. Value of countdown can be changed via !timer command.

Inventory
Below is an example of functions, that must be inside Inventory() structure to spawn player with certain inventory after countdown.
hPlayer.GiveItem("smg"); hPlayer.GiveItem("pistol"); hPlayer.SetHealth(50); hPlayer.SetHealthBuffer(30.0); TeleportEntity(hPlayer, Vector(-12052.7, 5905.2, 128.0), Vector(9.0, -75.0, 0.0)); hPlayer.SetReviveCount(2); hPlayer.GiveUpgrade(1); SetAmmo(hPlayer, 0, 25, 650, 25); SetAmmo(hPlayer, 1, 5);
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=919567729
Items Creation
To spawn items, find the needed item, type !picker in the chat and copy/paste created string in bottom of vs_st_speedrun.nut speedrun ScMp file, then edit the removal radius (6th argument) to prevent double-spawns (default spawns by the Director to make them not appear).
SpawnItem("item8", Vector(100, 50, 0), Vector(0, 0, 0), 1, null, 100);
  • 1st arg – item name (item8 is a vomitjar). List of items here: this[pastebin.com]
  • 2nd arg – position on map (X, Y, Z).
  • 3rd arg – rotation (Pitch, Yaw, Roll).
  • 4th arg – count of items in this spawn. Usually weapon spawn has "5" value there.
  • 5th arg – targetname. Argument null means, that we leave this field empty; also we can set the name, for example: "my_item").
  • 6th arg – removal radius. Any Director's item, that's spawned in this radius, will be removed.

Triggers
Some areas on the map can be scripted. It's more comfortable, than key-binds. Select desired place and type !trigger in chat. Copy this string in bottom of your file and rename trigger, because we may spawn another one later. After this changes are done, we need to specify our actions inside output function.

For example, Witch spawned ahead us, and my flashlight must be turned off.
::OnEntityOutput <- function() { if (g_ST.restart || activator == null || !activator.IsSurvivor()) return; local client = activator.GetEntityIndex(); if (caller.GetName() == "trigger_area1") //name of our trigger { SpawnZombie("witch", Vector()); //spawn Witch in specific position SendToConsole("impulse 100"); //toggle flashlight } else if (caller.GetName() == "trigger_area2") { //other trigger actions... ST_Idle(GetPlayer(MDL_CO)); //make IDLE for Coach } } SpawnTrigger("trigger_area1", Vector()); SpawnTrigger("trigger_area2", Vector());
Save the script and type !restart. Now, when you touch this area, script will perform your specified actions. To display trigger's bounding box and see it in the game, type !dbg trigger (default trigger size is 128x128x128 units); to manage trigger's size, edit 3rd and 4th arguments (see Speedrunner Tools API for detailed info about SpawnTrigger function).

NOTE: It's only simplified guide with basic knowledge about scripted speedruns. To gain more experience, explore websites below. Also, check out this Common Mistakes topic and try to avoid mistakes of other speedrunners in the future.

Links
Debugging tool Auu Menu.
List of chat-commands on the Commands page.
Description of ScMp functions on Speedrunner Tools API.
Also official L4D2 functions on the Valve website List of L4D2 Script Functions.
Everything about L4D2 Scripting.
Editat ultima dată de シェイディ♑; 26 ian. 2023 la 3:52
< >
Se afișează 1-5 din 5 comentarii
Jova 10 dec. 2017 la 12:52 
Some tutorial video plz??
シェイディ♑  [dezvoltator] 10 dec. 2017 la 13:46 
Yes, it will be...but anyway you can read information here and follow the steps – and you pretty can get the needed result
Можно же просто перекинуть vs_st_speedrun.nut из аддона в папке unlisted? ты чо тут колдуешь-то, кость? зачем колдуешь? а как болдеть?
シェイディ♑  [dezvoltator] 2 mart. 2020 la 8:17 
Postat inițial de ニバイムドイ♈:
Можно же просто перекинуть vs_st_speedrun.nut из аддона в папке unlisted? ты чо тут колдуешь-то, кость? зачем колдуешь? а как болдеть?
Чтобы перекинуть vs_st_speedrun.nut из аддона, нужно сначала скачать программу CSFScape, а это чуточку сложнее, чем просто скачать готовый файл.
Postat inițial de シェイディ♑:
Чтобы перекинуть vs_st_speedrun.nut из аддона, нужно сначала скачать программу CSFScape, а это чуточку сложнее, чем просто скачать готовый файл.

хихиххиххих! ТОГДА МОЖЕТ СТОИТ УБРАТЬ ПАПКУ UNLISTED ИЗ АДДОНА?
< >
Se afișează 1-5 din 5 comentarii
Per pagină: 1530 50