Getting Started
This guide walks you through creating and running your first AngelScript script in Perc Tarkov.
Script Location
Place your .as scripts in the scripts/ folder inside the cheat directory. Scripts are loaded automatically on startup.
Your First Script
hello.as — Hello World
void OnInit() {
Log("Hello from AngelScript!");
}This script runs once when the cheat initializes and prints a message to the console.
Script Lifecycle
Scripts have several entry points that are called at different times:
Lifecycle callbacks
void OnInit() {
// Called once when the script is loaded
Log("Script loaded!");
}
void OnTick() {
// Called every frame
// Put your main logic here
}
void OnShutdown() {
// Called when the script is unloaded
Log("Script unloaded!");
}Using the API
You can access game data through the built-in API. See the API Reference for the complete list.
Basic player info
void OnTick() {
Player@ player = GetLocalPlayer();
if (player !is null) {
Vector3 pos = player.GetPosition();
Log("Position: " + pos.x + ", " + pos.y + ", " + pos.z);
}
}Hot Reloading
Scripts support hot reloading — save your script file and it will be automatically reloaded without restarting. Check the console for any compilation errors.
Next Steps
- Browse the API Reference for available functions
- Check out Examples for ready-to-use scripts
Last updated on