I've been working through the lite-c workshops and decided to make an animated entity. I found something like this in the 21st workshop, so I copy and pasted it into my script and changed the names of variables, actions etc for my project.

The problem is that when I ran it the model wouldn't do the action, it would just stay stationary. So, does anyone know if there is something I may be doing wrong? This is the script:

///////////////////////////////
#include <acknex.h>
#include <default.c>

///////////////////////////////
var move_percentage;
function main()
{
level_load ("testlevel.wmb");
wait (2);
camera.z = 120;
camera.tilt = -15;
}
action move_entity()
{
while (1)
{ent_animate(my,"move",move_percentage, 99);
move_percentage += 5 * time_step;
wait (1);
}
}
I have also tried many variations of this code with many different action and model names (just in case of any similar names conflicting with each other or the engine or something) but nothing seems to work. Does anyone know what I am doing wrong?