Hey,
I have this problem: I want to put a zombie inside a jail, where he slams against the jailbars.
I have the zombie.mdl already, with animations. And now I wwant to loop this action, so he slams the jail bars all the time.
i use this script atm, got it from tutorial.3dgamestudio.net:
#include <acknex.h>
#include <default.c>
var attack_percentage;
function main()
{
video_mode = 7;
level_load ("Huis.wmb");
wait (2); // wait until the level is loaded
camera.z = 120; // choose a convenient height
camera.tilt = -15; // and tilt angle for the camera
}
action attack()
{
while (1)
{
ent_animate(my,"attack",walk_percentage, ANM_CYCLE); // "walk" animation loop
walk_percentage += 3 * time_step; // 3 = animation speed for "walk"
wait (1);
}
}
Prob is, I didnt load any zombie in the script, so he aint on the map yet.. and how do I call up his jailslam animation, as the tutorial isnt very clear and I tried every option i thought was nessecary.
Pleease help
![laugh laugh](/ubb7/images/graemlins/default_dark/laugh.gif)
i need this very much!
Thanks by lollollollollol
edit: I know there is still a walk animation located in this script etc.. but i really dont get the scripting part, and as everyone started once... I really could use your guys help with making a better script..or explaining how i can load the animation of jailslam.