Hi All,

I just pretty recently learned about GameStudio and am very excited about it. I have been trying few 3D game engines before, yet none were that close to what I was looking for as A8 is. I love the Lite_C idea being C/C++ developer myself. It is great to have MED and WEB on board too. Way to go!

I downloaded and installed demo of A8 and after spending last 4-5 days getting through tutorials and examples, I am pretty much confused by one thing.

I am sorry if this is a silly question, yet I was unable to find the way to do it using the official tutorials or by looking into samples.

I created a simple room using WED and wanted to test it the way player would do it. From docs I learned I need an action to do the player walk - there is even a sample action available in help. But I am sure I miss something since I do not know how to connect the action to whatever the player object would be.

Here's what I did:
1) (WED) Created a simple box/room and gave it some textures
2) (SED) Created a sample code:
Code:
///////////////////////////////////////////////////////////////////////////////////
#include <acknex.h>
#include <default.c>

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

action player_walk()
{ 
// if the entity has a non standard size, make sure that the bounding box does not drag along the floor
   if ((my.eflags&FAT) && (my.eflags&NARROW)) // when FAT+NARROW are both set
 		my.min_z *= 0.5;

   var speed_down = 0;   // downward speed by gravity
   var anim_percent = 0; // animation percentage
   VECTOR vFeet;
   vec_for_min(vFeet,me); // vFeet.z = distance from player origin to lowest vertex

   while (1)
   {
// rotate the player using the [A] and [D] keys      
      my.pan += 5*(key_a-key_d)*time_step; 

// determine the ground distance by a downwards trace
      var dist_down; 
      if (c_trace(my.x,vector(my.x,my.y,my.z-5000),IGNORE_ME | IGNORE_PASSABLE | USE_BOX) > 0)
         dist_down = my.z + vFeet.z - target.z; // get distance between player's feet and the ground
      else
         dist_down = 0;

// apply gravity when the player is in the air
      if (dist_down > 0)  // above floor, fall down with increasing speed
         dist_down = clamp(dist_down,0,accelerate(speed_down,5,0.1));
      else                // on or below floor, set downward speed to zero
         speed_down = 0;

// move the player using the [W] and [S] keys      
      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.3*dist_ahead; // 1.3 = walk cycle percentage per quant
         ent_animate(me,"walk",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);
   }
}


function main()
{
	video_mode = 8;
	level_load ("test2.wmb");
	wait(2); // wait until the level is loaded
}


3) Started the script from SED

After that I can just fly through all of the walls and entities without any usage of the player_walk action.

I am pretty sure I do something wrong or miss something.

Can you please turn and shove me into the right direction I would use to learn more of the GameStudio?