You can increase camera speed in both WED 3D view and the unscripted engine call by setting 'walk_speed' in File, Preferences, Main, Walk_speed.
If you want full control within the 'Run' parameter (run with the engine), you need a main script and camera or player action.
Example//--->George Pirvu
Code:
path ".\\scripts";
path ".\\models";
path ".\\models\\sky";
path ".\\models\\environment";
path ".\\sounds";
path ".\\images";
path ".\\maps";
////////////////////////////////////////////////////////////////////////////////////includes
//include "cameras.wdl";
////////////////////////////////////////////////////////////////////////////////////vars
//var d3d_antialias = 1;
//var shadow_stencil = on;
var gv_mouse_caged = off;//--->mercuryus
var camera_max_distance;
var camera_distance = 200;
var camera_height = 80;
var movement_speed; // player's movement speed
var gravity_force; // external forces (gravity)
var jumping = 0;
var game_started = 0;
////////////////////////////////////////////////////////////////////////////////////strings
string testLevel = "Your level name HERE.wmb";
////////////////////////////////////////////////////////////////////////////////////
//fonts
font arial = "arial", 0, 15;
//////////////////////////////////////////////////////////////////////////
//defines
define health skill40;
////////////////////////////////////////////////////////////////////////////
//bmaps
////////////////////////////////////////////////////////////////////////////
//functions
function player_jumps();
function start_game();
/////////////////////////////////////////////////////////////////////////
sky cube
{
type=<canyons+6.tga>;
layer=2; /// default
flags=cube,visible;
}
panel debug_pl// FPS counter
{
pos_x = 10;
pos_y = 10;
layer = 10;
digits = 5, 5, 3, arial, 16, time_fac;
flags = visible, refresh;
}
///////////////////////////////////////////////////////////
function main()
{
d3d_lightres = 1;
var d3d_mipmapping = 1;
var disable_z_glide = 1;
video_switch(7, 32, 0);
d3d_entsort = 3;//examples
fps_max = 60;//stop fps issues with FPS over 100
game_started = 1;
start_game();
}
function start_game()
{
wait(1);
me = null;
camera.clip_near = 0;
level_load (testLevel);
wait (3);
camera.clip_far = 45000;//or whatever your clipping dist is
}
action players_code
{
player = my; // I'm the player
wait(1); // wait 1 frame after creation
c_setminmax(me);
while (1)
{
camera.x = player.x - camera_distance * cos(player.pan);
camera.y = player.y - camera_distance * sin(player.pan);
camera.z = player.z + camera_height;
camera.pan = player.pan;
camera.tilt += 4 * mouse_force.y * time;
movement_speed.x = 15 * (key_w - key_s) * time_step; // move the player using "W" and "S"
movement_speed.y = 15 * (key_a - key_d) * time_step; // move the player using "A" and "D"
vec_set(temp.x, my.x);
temp.z = my.z - 30000;
gravity_force.z = max(-35*time_step, -(c_trace(my.x, temp.x, ignore_me|use_box)-1));
if ((key_w == 1) || (key_s == 1)) // the player is walking
{
ent_cycle("walk", my.skill20); // play walk frames animation
my.skill20 += 10 * time_step; // "walk" animation speed
if (my.skill20 > 100) {my.skill20 = 0;} // loop animation
if (my.skill30 >50)
{
ent_cycle("crouch", my.skill21);
}
}
else // the player is standing
{
ent_cycle("stand", my.skill21); // play stand frames animation
my.skill21 += 2 * time_step; // "stand" animation speed
if (my.skill21 > 100) {my.skill21 = 0;} // loop animation
}
if (key_a== 1) // strafe
{
ent_cycle("walk", my.skill24);
my.skill24 += 8 * time_step; // "walk" animation speed
}
if (key_d== 1) // strafe
{
ent_cycle("walk", my.skill24);
my.skill24 += 5 * time_step; // "walk" animation speed
}
if (key_r ==1 && key_w==1 )
{
movement_speed.x += 35 * time_step;
ent_cycle("run", my.skill20); // play run frames animation
my.skill20 += 6 * time_step; // "run" animation speed
if (my.skill20 > 100) {my.skill20 = 0;} // loop animation
if (my.skill30 <50)
{
ent_cycle("crouch", my.skill23);
}
else // the player is standing
{
ent_cycle("stand", my.skill21); // play stand frames animation
my.skill21 += 2 * time_step; // "stand" animation speed
if (my.skill21 > 100) {my.skill21 = 0;} // loop animation
}
}
if (jumping == 0)
{
vec_set(temp.x, my.x);
temp.z = my.z - 30000;
gravity_force.z = max(-35*time_step, -(c_trace(my.x, temp.x, ignore_me|use_box)-2));
my.skill30 = gravity_force;
if (my.skill30 < 20) // fall on the ground when closer than 50 quants to the surface
{
movement_speed.z = -my.skill30* time_step;
}
else // way up in the air?
{
movement_speed.z -= 20 * time_step; // then decrease player's z slowly
}
my.skill30 = gravity_force;
}
if (key_space == 1) // space to jump
{
player_jumps();
}
c_rotate(my, vector(6*(-mouse_force.x)*time_step, 0, 0), ignore_you);
c_move(my, movement_speed.x, gravity_force.x, glide); // move the player
wait(1);
}
}
function player_jumps()
{
proc_kill(4);
my.skill20 = 0;
jumping = 1;
while (my.skill20 < 50) //'hang' duration
{
ent_cycle("jump", my.skill20);
my.skill20 += 3 * time_step; // "jump" animation speed
if (my.skill20 < 50)
{
movement_speed.z += 0.1 * time_step;
}
else
{
movement_speed.z -= 0.1 * time_step;
}
wait (1);
}
jumping = 0;
}
Ive used this a few times in A6 but it needs some tweaking for A7 as the jump part fails sometimes but its enough to get you going.