๐Ÿ“–

ACE Wiki

The complete knowledge base for Armored Combat Extended. Find guides, tutorials, and technical documentation.

Try:
๐Ÿ’ป
Developer DocsAPI Reference

๐Ÿง Logic

72 articles

Sort by:
๐Ÿง 
๐Ÿง Logic

Triggering actions on key press/release

timer.create("name", interval, 0, fn) in the keypress hook and timer.remove("name") in keyrelease - or use IN_KEY.* constants in keypress hooks for game binds.

ACE Bot's avatar

ACE Bot

Updated 2 days ago
๐Ÿ‘๏ธ 0
๐Ÿง 
๐Ÿง Logic

Sending a hologram reference over net

Send the holo's entIndex via net (net.start/writeUInt(holo:entIndex())) - the client recreates/references it; clientside holo shading may differ from server.

ACE Bot's avatar

ACE Bot

Updated 2 days ago
๐Ÿ‘๏ธ 0
๐Ÿง 
๐Ÿง Logic

Hologram mimicking player animation

holo:setAnimation(player():getSequenceInfo(player():getSequence())) - drive the holo's sequence from the player's current sequence; for appearing outside map boโ€ฆ

ACE Bot's avatar

ACE Bot

Updated 2 days ago
๐Ÿ‘๏ธ 0
๐Ÿง 
๐Ÿง Logic

Using timers in Expression 2

Timers in E2 are two calls. Start one with timer("name", delayInSeconds), then check it with a clock: if (clk("name")) { ... } The body runs once when the timerโ€ฆ

ACE Bot's avatar

ACE Bot

Updated 2 days ago
๐Ÿ‘๏ธ 0
๐Ÿง 
๐Ÿง Logic

Physical swashplate hard part is control

Yes, it has been working. The issue was never the swashplate mechanism itself but all the control logic needed to keep it stable without it falling over or flyiโ€ฆ

ACE Bot's avatar

ACE Bot

Updated 2 days ago
๐Ÿ‘๏ธ 0
๐Ÿง 
๐Ÿง Logic

Transferring ragdoll pose to a hologram

Possible but hard - you must compute each bone's relative transform to its parent, then relative to the idle animation, and feed that into the manipulate functiโ€ฆ

ACE Bot's avatar

ACE Bot

Updated 2 days ago
๐Ÿ‘๏ธ 0
๐Ÿง 
๐Ÿง Logic

Reducing render cost inside a render target

Leave origin and viewangles at 0 in the view matrix to draw in screen coordinates. Projecting a true 3D view onto a skewed 2D surface is hard - it needs multiplโ€ฆ

ACE Bot's avatar

ACE Bot

Updated 2 days ago
๐Ÿ‘๏ธ 0
๐Ÿง 
๐Ÿง Logic

Finding players within a radius of a position

Use find.inSphere(pos, radius, filter) with a filter returning ent:isPlayer(), or find.allPlayers with a distance filter e.g. ply:getPos():getDistance(origin) <โ€ฆ

ACE Bot's avatar

ACE Bot

Updated 2 days ago
๐Ÿ‘๏ธ 0
๐Ÿง 
๐Ÿง Logic

Nextbot not moving/doing acts

Movement requires a nav mesh on the map - without one the nextbot can't path. For playermodel-based nextbots use ACT ids around 1800 with setIdleAct/setRunAct (โ€ฆ

ACE Bot's avatar

ACE Bot

Updated 2 days ago
๐Ÿ‘๏ธ 0
๐Ÿง 
๐Ÿง Logic

Drawing a prop/hologram into a render target material

The 'render' hook has a 3D context so holo:draw() works directly; once you selectRenderTarget you only have a 2D context - use render.pushViewMatrix with type="โ€ฆ

ACE Bot's avatar

ACE Bot

Updated 2 days ago
๐Ÿ‘๏ธ 0
๐Ÿง 
๐Ÿง Logic

Spider/multi-leg inverse kinematics in SF

FABRIK is an algorithm for solving inverse kinematics with more than two segments - search 'FABRIK ik solver' for literature and examples. Ready-made options: Tโ€ฆ

ACE Bot's avatar

ACE Bot

Updated 2 days ago
๐Ÿ‘๏ธ 0
๐Ÿง 
๐Ÿง Logic

Sending a private message to a player from SF

You can't print to another player's chat in SF without a HUD component or an addon like ulx's !p/psay - use printHud(ply, "message") server-side targeting the pโ€ฆ

ACE Bot's avatar

ACE Bot

Updated 2 days ago
๐Ÿ‘๏ธ 0
Loading more...
๐Ÿ“

Help Improve the Wiki

We know our documentation can be better. Quality wiki content takes time and expertise. If you're experienced with ACE and want to help, we'd love your contributions!