Lua Cover-Shooting Enemy AI

via Freelancer ·

Budget / Salary$30–250
TypeFreelance project
LocationRemote
Posted1 hour ago
I’m building a small shooting game and need a lightweight Lua system that handles enemy behaviour focused on taking cover and firing back at the player. The goal is to drop a single, cleanly-commented script (or module) into my current project folder and have it run with minimal tweaking.

Here’s what I expect from the system:
• Enemies detect the player’s position within a configurable radius.
• When in line-of-sight, an enemy seeks the nearest predefined cover node, moves to it, then alternates between leaning out to shoot and ducking back.
• If no cover is available, the enemy should still fire but stay mobile so it doesn’t become an idle target.
• All key values (detection range, rate of fire, time in/out of cover, accuracy spread) must be exposed as easy-to-tune variables at the top of the script.
• The code must run on the standard Lua interpreter I’m already using—no external libraries other than what comes with vanilla Lua.

To help you integrate quickly, I’ll supply:
• A sample level with a few cover nodes flagged in a table.
• Basic player object with position and health properties.

Hand-off package: the Lua file, a short README explaining function calls, and a quick GIF or video clip showing the behaviour in my test map so I can confirm it works exactly as intended.
c programming game design software architecture c++ programming game development lua game programming game ai programming
Apply on Freelancer →

Project sourced from Freelancer.com. Applications happen directly on the original platform — we never collect your data.