آموزش ساخت ماشين ( اطاعت از تمام قوانين فيزيك) در تري دي گيم استوديو ! [آرشيو] - P30World Forums

PDA

View Full Version : آموزش ساخت ماشين ( اطاعت از تمام قوانين فيزيك) در تري دي گيم استوديو !


Moh3en_DDD
09-02-2006, 12:14 PM
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);
}
}




اين متن اسكريپتش بود كه خود من ساختمش .... !


تمام قوانين فيزيكي مانند قوانيد :

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


در روز هاي آتي آموزش اسكريپتي كه نوشتم براي شما را مي دم !

Moh3en_DDD
01-20-2008, 11:17 PM
این تاپیک را برای علاقه مندان کشوندم بالا

Omid_Sadeghvand
01-20-2008, 11:43 PM
:31::31::31::31:
آخر نفهمیدم تو با چه موتوری کار میکنی؟
:31::31::31::31:

Max2000
01-22-2008, 08:41 PM
به نام خدا
آقا محسن لطفا آموزش دستوراتش را هم بگذار

Moh3en_DDD
01-23-2008, 11:29 PM
به زودی ... این چند روزه امتحان دارم

hadi665
01-27-2008, 03:52 PM
محسن جان دمت گرم
ولی ای کاش یه جورایی توضیح میدادین که منه animator بتونم از این کد ها استفاده کنم
مثل چگونگی فراخوانی این فایلا تو تابع main
ممنون که به فکر مایی

Moh3en_DDD
01-27-2008, 09:14 PM
بخش زیادی از این ها را توی تاپیک آموزش این نرم افزار گذاشته بودم ...

persian_Eragon
02-07-2008, 03:27 AM
سلا م کمکی از من بر میاد