I tried what you suggested and it fails with the completely unhelpfull message "sytax error". Heres the code:

=================================================================

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

ENTITY* FLOOR;

typedef struct
{
string* model;
} box; // THIS LINE CAUSES THE PROBLEM, SOME HOW :S

function new_box()
{
box my_box;
my_box.model = "cube.x";
my_box.x = -400;
my_box.y = 0;
my_box.z = 100;
my_box.tilt = 145;
my_box.z = 2800;
my_box.y = -300;
my_box.x = 60;
phent_settype (my_box, PH_RIGID, PH_BOX); // set the physics entity type
phent_setmass (my_box, 3, PH_BOX); // and its mass
phent_setfriction (my_box, 80); // set the friction
phent_setdamping (my_box, 40, 40); // set the damping
phent_setelasticity (my_box, 50, 20); // set the elasticity

}

function main()
{
video_mode=7;
level_load("");
FLOOR = ent_create ("plain3d1.x", vector(-400, 0, 100), NULL); // create the ball
set(FLOOR,LIGHT);
wait(2);
camera.x = 7500;
camera.y = 250;
camera.z = 1250;
camera.pan = 180;
FLOOR.scale_x=5000;
FLOOR.scale_y=5000;
FLOOR.scale_z=30;
FLOOR.z = -5;
FLOOR.red = 0;
FLOOR.green =0;
FLOOR.blue =0;
FLOOR.ambient = 25;
FLOOR.z=-50;

ph_setgravity (vector(0, 0, -6086)); // set the gravity

while (1)
{
// CONTROLS
mouse_pos.x = mouse_cursor.x;
mouse_pos.y = mouse_cursor.y;
camera.pan -= mouse_force.x * 2;
camera.tilt += mouse_force.y * 2;
if (key_w) camera.y += 12 * time_step;
if (key_s) camera.y -= 12 * time_step;
if (key_a) camera.x += 12 * time_step;
if (key_d) camera.x -= 12 * time_step;
on_e = new_box;
wait(1);
}
}

==============================================================

At present all i want the program to do is to create a box upon pressing the E key, then apply physics to that box so it falls onto the rather boxy landscape. I have a thing for boxes you see!

All models used in this script are boxes, bascally!


I am a noob to this... Blitz3D is where i am best at!