View Full Version :


 

Moh3en_DDD
09-02-2006, 11:14 AM
var Video_mode =6;
var video_depth = 32 ;
var speed = 0 ;
string a = "game.wmb" ;
function main (){
level_load(a);
wait(1);
}
action mohsen {
while(1){
wait(1);
ent_move(vector(0,speed,0),nullvector);
if(key_m == on ){
speed += .010000001 ;
chase_camera(my);
}
if (key_m==off){
speed -= (speed/300) ;
if (speed < .5){
speed = 0;
}

}
if (key_space ==on){
speed -=(speed/60);
}
if(key_n==on && speed> 0){
my.pan += (speed/8) ;
}
if(key_k==on && speed>0){
my.pan -= (speed/8) ;
}
if ( speed > 5 ){
speed == 5 ;
}

}
}
// A camera is hunting a target and turns with them. The target is always in the middle of the views
var cam_dist[3] = 0,-200,60; // xyz Distance of the camera towards the target
function chase_camera(target)
{
my = target; // The target Entity
// calculate the camera view's direction angle to the target
var cam_ang[3]; // direction angle of the camera to the target.
vec_diff(temp,nullvector,cam_dist);
vec_to_angle(cam_ang,temp);
cam_ang.roll = 0; // roll didn't change vec_to_angle

// permanent updating of the camera's position and angle
while (1)
{
// place the camera at the right position to the target
vec_set(camera.x,cam_dist);
vec_rotate(camera.x,my.pan);
vec_add(camera.x,my.x);
// Set the camera angles to the camera view direction
vec_set(camera.pan,cam_ang);
// and rotate it about the target angle
ang_add(camera.pan,my.pan);
wait(1);
}
}




این متن اسکریپتش بود که خود من ساختمش .... !


تمام قوانین فیزیکی مانند قوانید :

شتاب .... جاذبه .... اینرسی ... سیستم دور ( نسبت به سرعت ) و .... !


در روز های آتی آموزش اسکریپتی که نوشتم برای شما را می دم !

دسته ها :
دوشنبه بیست و سوم 10 1387
X