starting a blank script?

Posted By: heinekenbottle

starting a blank script? - 11/02/08 02:16

How do I start a script complete from scratch?

I tried to go to go to properties -> A7 Lite_C Project so I'd get the function main() and the required #included files and I wrote up a script

But I can't seem to get it to stop messing with the camera.

Code:
///////////////////////////////
#define PRAGMA_PATH "%EXE_DIR%\templates\images";
#define PRAGMA_PATH "%EXE_DIR%\templates\models";
#define PRAGMA_PATH "%EXE_DIR%\templates\sounds";

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

function main()
{
	level_load("darin1.WMB");
	wait(2);
	printf("Press [0] to move the camera!");
}

action suzetta()
{
	while(1)
	{
		my.skill2 = 5 * (key_w - key_s);
		my.pan = 5 * (key_a - key_d);
		c_move(my,my.skill2,nullvector,IGNORE_PASSABLE);
		camera.x = my.x;
		camera.y = my.y;
		camera.z = my.z;
		wait(1);
	}
}


Is all I've got. And all I want is to get the camera to follow the model with the action "suzetta" (the name of the player character)

But for some reason, something else seems to take control of the camera, like a walk-through script. How do I get rid of that?

Default.c was commented out because I was trying to find out where this alternate camera script was lurking

All I want is the camera to do what it is suppose to do in the Suzetta action.
Posted By: DJBMASTER

Re: starting a blank script? - 11/02/08 02:34

To make a script from complete scratch...

Open SED, add the lines

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

save the file as .c (have to write is explicitly) and there you have the basics of any lite-c script.
Posted By: heinekenbottle

Re: starting a blank script? - 11/02/08 02:52

Ah, thank you for that. I was thinking that something in default.c and acknex.c was doing something with the camera.

But I still have a problem and I don't see where it is coming from.

Somehow the model is being scaled when I run the level, so that she intersects with the ceiling of the room she is in. In WED, the room is about twice as high as she is, so there is plenty of space. There is a skybox around the level as well.
© 2023 lite-C Forums