ACE Wiki
The complete knowledge base for Armored Combat Extended. Find guides, tutorials, and technical documentation.
๐ง Logic
72 articles
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
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
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
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
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
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
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
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
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
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
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
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