Well I have no problem posting my code but since I can replicate the identical issue in the Official Online Tutorial I figured more people have gone through it so maybe more familiar with the script.

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

///////////////////////////////

var walk_percentage;
var death_percentage;

function main()
{
	video_mode = 7;
	level_load ("work21.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 walking_guard()
{ 
	wait (-35); // added this as a test
	while (1) 
	{ 
		ent_animate(my,"walk",walk_percentage, ANM_CYCLE); // "walk" animation loop
		walk_percentage += 3 * time_step; // 3 = animation speed for "walk"
		wait (1); 
	} 
} 

action dead_guard()
{ 
	wait (-5); // wait 5 seconds
	while (1) 
	{ 
		ent_animate(my, "death", death_percentage, 0); // "death" one-shot animation 
		death_percentage += 3 * time_step; // 2  = animation speed for "death"
		wait (1); 
	} 
}


I decided to re-download the tutorial files and try it again from scratch. There was a difference, now instead of 45 second delay it is now 25-30 seconds. Ha. I noticed playing with my script the animate seems independent of any values and is based on time which, would be bizarre. So to test this I added the wait (-35); in the above script and as soon as the wait completed the animate went straight into whacko mode ignoring the 'walk' and playing all frames of the model. I put the 'death' entity on ANM_CYCLE mode as well and just like walk after the period of time it cycled through all frames. Thus I was thinking it was something with ANM_CYCLE. Just ran a test with the wait 35 animate with a mode 0 and though it did only perform one animation it cycled through all of them. So it appears that after some time frame of 25-45 seconds ent_animate ignores the animation_name. I doubt it would be software issue because if it were, there would be much more chaos about it. So the only other possibility if it is something they attached to the trial version. Anyone else with trial and the litec-samples workshop want to run workshop 21 until it times-out to see if the walking guard behaves abnormally? I'm always up for new options.

Here is my code. Sloppy, just piecing things here and there to learn 3DGS. Other than this animation issue it works just the way I am hoping it to at this point.

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

////////////////////////////////////////////////////////////////////////////////////
ENTITY* player;
VECTOR temp;
var anim_percent = 0;
var dist_ahead = 0;
var dist_down = 0;

function main()
{
	video_mode = 7;
	level_load ("test.wmb");
	wait (2);
	}

action move_me()
{
	while (1)
	{
		if (key_a) me.pan += 10 * time_step;
		if (key_d) me.pan -= 10 * time_step;
		camera.x = me.x + fcos(my.pan,-1 * 250);
		camera.y = me.y + fsin(my.pan,-1 * 250);
		vec_diff(temp.x,me.x,camera.x); //make the camera look towards the player
		vec_to_angle(camera.pan,temp.x);
		camera.z = 25;
		camera.tilt = -20;

      var dist_ahead = 5*(key_w-key_s)*time_step;
      dist_ahead = sign(dist_ahead)*(abs(dist_ahead) + 0.5*dist_down); // adapt the speed on slopes
      c_move(me,vector(dist_ahead,0,0),vector(0,0,-dist_down),IGNORE_PASSABLE | GLIDE); // move the player

		// animate the player according to its moved distance
      if (dist_ahead != 0) // player is moving ahead
      {
         anim_percent += 1.7*dist_ahead; // 1.7 = walk cycle percentage per quant
         ent_animate(me,"walka",anim_percent,ANM_CYCLE); // play the "walk" animation
      }

      else // player stands still
      { 
         anim_percent += 5*time_step; 
         ent_animate(me,"stand",anim_percent,ANM_CYCLE); // play the "stand" animation
      }
		wait (1);
	}
}


Originally Posted By: EvilSOB
And do you use the templates?
And are you using lite-c or c-script?


Don't use templates though dabbled with one briefly only to be more confused. I prefer from scratch, 1 line at a time method. I use lite-c. Downloaded the free trial ... day before yesterday, I think.

Last edited by Sonne; 03/15/09 18:29. Reason: Answer questions