I'm attempting to use Lua modify a polygon whilst a level is in play.

So, I can change the height of a polygon easily enough:

Code: Select all

```
Triggers = {}
function Triggers.idle()
MoverUp()
end
-- Slowly move the floor of a polygon upwards until a threshold is
-- reached (rather like a platform raising from the ground)
--
function MoverUp()
polygon = Polygons[54]
if polygon.floor.height < 0.6 then
polygon.floor.height = polygon.floor.height + 0.001
end
end
```

Code: Select all

```
Triggers = {}
function Triggers.idle()
MoverForward()
end
-- Slowly edge a polygon forward to the edge of a room.
--
function MoverForward()
polygon = Polygons[54]
for e in polygon:endpoints() do
e.x = e.x + 0.1
end
end
```

Does anyone know if there's a way to move the position of a polygon, or does the Aleph One engine render this stuff before the start of the level and we're stuck with it?