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
1 registered members (TipmyPip), 18,574 guests, and 6 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
I can't move the camera in "run" mode #189348
03/18/08 20:05
03/18/08 20:05
Joined: Aug 2006
Posts: 28
United States
luis29999 Offline OP
Newbie
luis29999  Offline OP
Newbie

Joined: Aug 2006
Posts: 28
United States
I have created a small house just like the tutorial says. I click the "build" buttom, and then "run". Everything goes perfect with no errors when building the level.
But when I click run, I can't move the camera to any directions with the mouse pointer or the arrow keys.
I remember being able to move on my old Windows Xp computer, but now I am using Vista. If you know the solution to this problem, or if you think that you do, please answer me.

Thank you.

Re: I can't move the camera in "run" mode [Re: luis29999] #189349
03/18/08 21:07
03/18/08 21:07
Joined: Mar 2003
Posts: 4,264
Wellington
Nems Offline

.
Nems  Offline

.

Joined: Mar 2003
Posts: 4,264
Wellington
without a script, pres the zero button once or twice from memeory

Re: I can't move the camera in "run" mode [Re: Nems] #189350
03/18/08 21:42
03/18/08 21:42
Joined: Aug 2006
Posts: 28
United States
luis29999 Offline OP
Newbie
luis29999  Offline OP
Newbie

Joined: Aug 2006
Posts: 28
United States
Hey thanks a lot! now it works! It there anything that I can do so I don't have to keep pressing the 0 key everytime?

Last edited by luis29999; 03/18/08 21:48.
Re: I can't move the camera in "run" mode [Re: luis29999] #189351
03/19/08 06:17
03/19/08 06:17
Joined: Mar 2003
Posts: 4,264
Wellington
Nems Offline

.
Nems  Offline

.

Joined: Mar 2003
Posts: 4,264
Wellington
Make a generic Start script with a camera in it.
Refer to the AUMs (Acknex User Magazine) for working examples.
Then every time you want to test a new scene out, add the script, apply the camera action to an object in the scene (just a small ball or box or something) and check it out.

Ive got one of Georges lying around somewhere in my hard drive so as soon as I find that, I'll past it here for you to check out.

[EDIT]
OK, copy/paste this into Word (not office word!)
Then save as "TestScript.wdl" including the "" marks (dont know lite c)
Then place a small onject in your level and attach the "Freecamera" action to it, update entits or build then go.


Aslo has some basics in it like fps counter, version used etc.

When in runtime, press c to use camera.
Dont be scared to play with values.
Code:

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

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

//string testLevel = "WRITE YOUR LEVEL NAME HERE.wmb"; //delete the comment (// =. comment marks) marks to make this bit work

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


////////////////////////////////////////////////////////////////////////
/*
sky cube =
{
type=<Sky+6.tga>;
layer=2; /// default
//z= 20; //// shifts height, experiment with this value
material=mat_sky; //makes sky brighter
flags = CUBE | VISIBLE;
}*/
//-----------------------------------------\\
//George Pirvue
panel debug_pl// FPS counter
{
pos_x = 10;
pos_y = 10;
layer = 40;
digits = 5, 5, 3, arial, 16, time_fac;
flags = visible, refresh;
}
//-----------------------------------------\\
//George Pirvue
string version_str;

string engine_str;



text version_txt

{

layer = 5;

pos_x = 30;

pos_y = 25;

string = engine_str;

}


//George Pirvue
starter display_version()

{

sleep (2); // wait until the level is loaded, the splash screen is displayed, and so on

str_for_num(version_str, version);

str_cpy(engine_str, "Starting Acknex v");

str_cat(engine_str, version_str);

version_txt.visible = on; // show the engine version for 5 seconds

sleep (10);

version_txt.visible = off;

}


function main()
{
var fog_range = 10000;
video_switch(7, 32, 2);
d3d_entsort = 2;
var tex_share = 1;
max_entities = 5000;
wait(1);

level_load (testLevel);
wait (3);
camera.clip_near = 0;
camera.clip_far = 10000;//clip range...how far the camera will show stuff before clipping them out, Play with 10000
fps_max = 60;

//Some basic background stuff and fog
bg_color = 1;
d3d_fogcolor1.red = 10;
d3d_fogcolor1.green = 10;
d3d_fogcolor1.blue = 10;
fog_color = 1;

camera.fog_start = 0.05 * fog_range; // fog at 5% of fog_range
camera.fog_end = 0.8 * fog_range;// fog till 80% of fog_range


}




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

//By George Pirvue, Edited by Nems
view mycamera
{
}


Var movement_speed[3];
action Freecamera
{
mycamera.pos_x = 0;
mycamera.pos_y = 0;
mycamera.size_x = screen_size.x;
mycamera.size_y = screen_size.y;
mycamera.ambient = 50;//play with 50 to brighten or darken view
mycamera.visible = on;
my.invisible = on;
while (1)
{
vec_set(mycamera.x, my.x);
mycamera.pan = my.pan;
mycamera.tilt = my.tilt;
my.pan -= 10 * mouse_force.x * time_step;//play with 10 to increas/decreas speed
my.tilt += 10 * mouse_force.y * time_step;
movement_speed.x = 60* (mouse_right-mouse_left)*time_step;
movement_speed.y = 0;
movement_speed.z = 0;

if(key_w == 1)
{
movement_speed.x += 8*time_step;//play with 8 to increase or decrease speed
}
if(key_s == 1)
{
movement_speed.x -= 8*time_step;//play with 8 to increase or decrease speed
}
c_move (my, movement_speed.x, nullvector, glide);
wait (1);
}
}

function switch_cameras()
{
camera.visible = (camera.visible == off);
mycamera.visible = (camera.visible == off);
}

on_c = switch_cameras;







Last edited by Nems; 03/19/08 23:45.

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