Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
0 registered members (), 18,767 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
starting a blank script? #234314
11/02/08 02:16
11/02/08 02:16
Joined: Oct 2008
Posts: 218
Nashua NH
heinekenbottle Offline OP
Member
heinekenbottle  Offline OP
Member

Joined: Oct 2008
Posts: 218
Nashua NH
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.

Last edited by heinekenbottle; 11/02/08 02:28.

I was once Anonymous_Alcoholic.

Code Breakpoint;
Re: starting a blank script? [Re: heinekenbottle] #234315
11/02/08 02:34
11/02/08 02:34
Joined: Nov 2007
Posts: 1,143
United Kingdom
DJBMASTER Offline
Serious User
DJBMASTER  Offline
Serious User

Joined: Nov 2007
Posts: 1,143
United Kingdom
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.

Re: starting a blank script? [Re: DJBMASTER] #234316
11/02/08 02:52
11/02/08 02:52
Joined: Oct 2008
Posts: 218
Nashua NH
heinekenbottle Offline OP
Member
heinekenbottle  Offline OP
Member

Joined: Oct 2008
Posts: 218
Nashua NH
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.


I was once Anonymous_Alcoholic.

Code Breakpoint;

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1