Assembly LUA Helpers
A Visual Studio Code extension that provides comprehensive IntelliSense support for the Assembly Lua API. This extension enhances your development experience with autocompletions, documentation, and snippets.
Features
- Intelligent Code Completion for all Assembly Lua API functions
- Detailed Documentation available on hover
- Parameter Information while typing function calls
- Organized by Categories:
- UI Elements (checkbox, button, slider, etc.)
- Global Functions
- Camera Controls
- Game Instances
- Entity Cache System
- Rendering Functions
- JSON Handling
- Math Operations (Vector2, Vector3, Matrix3)
- Utility Functions
- HTTP Requests
- Event System
- Input Management
Usage
This extension activates automatically when editing Lua files. Simply start typing to see suggestions for the Assembly Lua API.
Examples
UI Elements
-- Create a checkbox
local checkbox = ui.new_checkbox("Enable Feature")
if checkbox:get() then
-- Feature is enabled
end
-- Create a slider
local slider = ui.slider_float("Opacity", 0.5, 0.0, 1.0, "%.2f")
local value = slider:get()
Entity Cache System
-- Access cached player data
local players = entity.get_players()
for _, player in ipairs(players) do
local name = player:Name()
local health = player:Health()
print(name, health)
end
Rendering
-- Render text on screen
render.text(10, 10, "Hello World", 255, 255, 255, 255, "s", 2)
-- Draw a rectangle
render.rect(100, 100, 200, 150, 255, 0, 0, 128, 5)
Utilities
-- Convert 3D world position to 2D screen coordinates
local screenPos = utils.world_to_screen(worldPosition)
print("Screen position:", screenPos.x, screenPos.y)
-- Get random numbers
local random = utils.random_int(1, 10)
HTTP Requests
-- Make a GET request
http.get("https://api.example.com/data", function(response)
local data = json.parse(response)
print("Received data:", data.message)
end)
Requirements
- Visual Studio Code 1.60.0 or higher
Installation
From VSIX File
- Download the
.vsix
file
- Open VS Code
- Go to Extensions view (Ctrl+Shift+X)
- Click the "..." in the top-right of the Extensions view
- Select "Install from VSIX..."
- Choose the downloaded file
License
MIT