|
|
|
|
|
|
نويسنده |
پيغام |
kiavash2k کاربر جدید
تاريخ عضويت: 2 شنبه 3 بهمن 1384 تعداد ارسالها: 17
4 شنبه 6 ارديبهشت 1385 - 02:59 |
|
|
كد: |
In code ro mitonid to ghesmate main bezarid
in code baraye sakhtane ye panel roye safhe mibashad ke ghabele click kardan mibashad mesle panel haye bazihaye Adventure va ...
code:
///////////////////////////////////////////
//Touch and panel + Text will appear////////////
//First create a panel in any photo/Paint editing program////
//Size must be 640 X 480////
//harchi ke meshkiye gheyb mishe yani [Overlay].///
//save it as test.bmp into your work folder.///
//Now put the following code into the bottom of your main//
//WDL//
////KIAVASH2K@yahoo.com////////////////////
///////////////Bmaps/////////////////
bmap test_for_5sec = <test.bmp>;
//////////////Panels////////////////////
Panel test_panel
{
Layer 2;
bmap = test_for_5sec;
flags = refresh,d3d,transparent;
}
string textap_str = "You did it !";
text you_did
{
pos_x = 300;
pos_y = 240;
font = standard_font;
string = textap_str;
layer = 10;
flags = transparent, d3d, center_x, center_y, narrow;
}
///////////////////new/////////////
function text()
{
set you_did.visible,on;
set you_did.visible,on;
waitt(80);
set test_panel.visible,off;
set you_did.visible,off;
wait(1);
} }
ACTION Show_pictext {
SET MY.ENABLE_IMPACT, ON;
SET MY.EVENT text;
}
//Now in the game give an entitie or Object the pictext action//
//Built run and when your player touches it the panel will//
//appear with text.//
//If you want only the picture to appear remove the text stuff//
|
|
_________________ Age betoonam komak konam khosh hal misham. HF
Kiavash2k@hotmail.com |
|
بازگشت به بالا |
|
|
|
|
|
|
|
|
|
|
|
|
|
نويسنده |
پيغام |
kiavash2k کاربر جدید
تاريخ عضويت: 2 شنبه 3 بهمن 1384 تعداد ارسالها: 17
4 شنبه 6 ارديبهشت 1385 - 17:47 |
|
|
كد: |
khoob in ye code baraye onaye ye ke doom3 bazi mikonan na shokhikardam
in code flash light mibashad
hamin tori ke to khate 2 code ha neveshte shode shoma ba zadan kelid
(E) flash light ra faal mikonid.
ta hala be ye kelid ke lampe otaghetono roshan mikone fek kardid
2 halat dare roshan va khamosh be in kelid ha ke 2 ta kar
anjam midan migan kelid haye 2 kare
ba in code shoma ham felash light darid ha m kelide 2 kare
hamishe say konid az har code 10 ta chize mokhtalef bekeshid
biroon ta karetoon asoon tar beshe
HF And GL
K2kFlashlight.wdl
----------------------------------------------
VAR Light_on;
ON_E set_light;
var MyPos[3];
// in function baraye ine ke age khamosh bood roshan kone
// ya age roshan bood khamosh kone
// kiavash2k@yahoo.com
FUNCTION set_light ()
{
IF (Light_on == 0)
{
Light_on = 1;
CREATE <trigger.mdl>,PLAYER.POS,light_akt; // <------------ deghat kon .mdl
} ELSE { Light_on = 0;}
}
// inam ke ye sharte va loop dare ke miyad mige age
// light_on == 1 bood pas rooshan kon
// sharte bala taein mikone ke 1 ya 0 bashe
FUNCTION light_akt ()
{
MY.INVISIBLE = ON;
MY.PASSABLE = ON;
WHILE (Light_on == 1)
{
MyPos.X = 5000;
MyPos.Y = 0;
MyPos.Z = 0;
VECROTATE MyPos,CAMERA.PAN;
VEC_ADD (MyPos,CAMERA.POS);
LOOK NULL,CAMERA.POS,MyPos;
IF (RESULT > 0)
{
VEC_SET (MyPos,TARGET);
temp.X = NORMAL.X * 20;
temp.Y = NORMAL.Y * 20;
temp.Z = NORMAL.Z * 20;
VEC_ADD (MyPos,temp);
VEC_SET (MY.POS,MyPos);
}
MY.LIGHTRANGE = vec_dist(camera.pos,my.pos) * 0.5;
MY.LIGHTRED = 200 - ( vec_dist(camera.pos,my.pos) * 0.1 );
MY.LIGHTGREEN = 200 - ( vec_dist(camera.pos,my.pos) * 0.1 );
MY.LIGHTBLUE = 200 - ( vec_dist(camera.pos,my.pos) * 0.1 );
WAIT (1);
}
REMOVE ME;
}
|
|
_________________ Age betoonam komak konam khosh hal misham. HF
Kiavash2k@hotmail.com |
|
بازگشت به بالا |
|
|
|
|
|
|
|
نويسنده |
پيغام |
kiavash2k کاربر جدید
تاريخ عضويت: 2 شنبه 3 بهمن 1384 تعداد ارسالها: 17
4 شنبه 6 ارديبهشت 1385 - 17:48 |
|
|
كد: |
agha ye code sade vali good mikham behetoon yad bedam
az shoma 11 ta aks migire ke har kodomo vaghti health
shoma be hadi ke shoma taeein mikonid resid neshon bede
khoob mesle baziye doom 2 ya wolf 3d ya doom ke ye
aks toye panelesh bood ke age tir mikhordi khoni
mishodesh age ya detoon bashe.
Note:
Man hamishe migam "Simple but it work" man kheyli code neveshtam
midoonid shayad in be nazaretoon kheyli sade bashe
vali kheyli bazi ha hast ke az code az inam sade tar behtarin
estefade ro mikonam pas say konim ke az in behtarin estefade ro
bokonim eg.
(masalan to game max payne vaghti mimirim camera ye bazi roye ye
camera path gerd shoro mikone dore ma micharkhe khob ba in kod
hamoon karam mitoonim bokonim)
k2kHealth.wdl
------------------------------------------
bmap health_full = <health.bmp>; // khoob ma inja 11 ta aks ro behesh moarefi mikonim
bmap 2health_full = <2health.bmp>; // baraye inke in aksa ghati nashe ba baghiyeye aks ha
bmap 3health_full = <3health.bmp>; // in ke migam albate optionale vali mitonim ye path
bmap 4health_full = <4health.bmp>; // taerif konim va aksha ro be rizim toye on folder
bmap 5health_full = <5health.bmp>; // baraye taerif kardane path be in sorat amal mikonim
bmap 6health_full = <6health.bmp>; // path "healthpic"; // path syntax
bmap 7health_full = <7health.bmp>; // khoob kalameye (healthpic) hamon folderi ye ke ma
bmap 8health_full = <8health.bmp>; // akshamoono tosh mirizim
bmap 9health_full = <9health.bmp>; // albate mitonim in karo aslan anjam nadim :) GL
bmap 10health_full = <10health.bmp>;
bmap 11health_full = <10health.bmp>;
var hp = 100; // health shoma az 100 shoro mishe
var lose_health = 0;
var add_health = 0;
panel health1
{
bmap = health_full;
pos_x = 0;
pos_y = 0;
layer = 11;
flags = overlay, refresh, d3d;
}
panel health2
{
bmap = 2health_full;
pos_x = 0;
pos_y = 0;
layer = 11;
flags = overlay, refresh, d3d;
}
panel health3
{
bmap = 3health_full;
pos_x = 0;
pos_y = 0;
layer = 11;
flags = overlay, refresh, d3d;
}
panel health4
{
bmap = 4health_full;
pos_x = 0;
pos_y = 0;
layer = 11;
flags = overlay, refresh, d3d;
}
panel health5
{
bmap = 5health_full;
pos_x = 0;
pos_y = 0;
layer = 11;
flags = overlay, refresh, d3d;
}
panel health6
{
bmap = 6health_full;
pos_x = 0;
pos_y = 0;
layer = 11;
flags = overlay, refresh, d3d;
}
panel health7
{
bmap = 7health_full;
pos_x = 0;
pos_y = 0;
layer = 11;
flags = overlay, refresh, d3d;
}
panel health8
{
bmap = 8health_full;
pos_x = 0;
pos_y = 0;
layer = 11;
flags = overlay, refresh, d3d;
}
panel health9
{
bmap = 9health_full;
pos_x = 0;
pos_y = 0;
layer = 11;
flags = overlay, refresh, d3d;
}
panel health10
{
bmap = 10health_full;
pos_x = 0;
pos_y = 0;
layer = 11;
flags = overlay, refresh, d3d;
}
panel health11
{
bmap = 11health_full;
pos_x = 0;
pos_y = 0;
layer = 11;
flags = overlay, refresh, d3d;
}
function my_colour();
sound entsound2 = <noise.wav>; // in sound vahghti play mishe ke (damage) mikhori
sound entsound3 = <noise.wav>; // inam vaghti ke (health) mikhori
// inja be ezaye kam shodan har 10 health ye aks avaz mishe
// kheyli code vazehe fek mikonam
function health_codedown()
{
hp += 10; // hp hamoon health shomast
if(hp > 100){hp = 100;}
play_sound (entsound3, 80);
if(hp == 100){health1.visible = on; my_colour();}
if(hp == 90){health2.visible = on; my_colour();}
if(hp == 80){health3.visible = on; my_colour();}
if(hp == 70){health4.visible = on; my_colour();}
if(hp == 60){health5.visible = on; my_colour();}
if(hp == 50){health6.visible = on; my_colour();}
if(hp == 40){health7.visible = on; my_colour();}
if(hp == 30){health8.visible = on; my_colour();}
if(hp == 20){health9.visible = on; my_colour();}
if(hp == 10){health10.visible = on; my_colour();}
if(hp == 0){health11.visible = on;my_colour();} // health 11 yani dige mordi
if(hp != 100){health1.visible = off; }
if(hp != 90){health2.visible = off; }
if(hp != 80){health3.visible = off; }
if(hp != 70){health4.visible = off; }
if(hp != 60){health5.visible = off; }
if(hp != 50){health6.visible = off; }
if(hp != 40){health7.visible = off; }
if(hp != 30){health8.visible = off; }
if(hp != 20){health9.visible = off; }
if(hp != 10){health10.visible = off; }
if(hp != 0){health11.visible = off; }
if(hp <= 0){death_d();}
}
// hatman migid ke chera 2 bar to 2ta function mesle ham ke
// faghat esmeshon fargh mikone code haye shabih be ham
// neveshte shode be khatere ine ke ye bar bayad in ke
// alan health ezafe shod ro code konim ye baram inke alan
// health kam shod ro code konim
function health_codeup()
{
hp -= 10; // hp is ur health
if(hp > 100){hp = 100;}
play_sound (entsound2, 80);
if(hp == 100){health1.visible = on; my_colour();}
if(hp == 90){health2.visible = on; my_colour();}
if(hp == 80){health3.visible = on; my_colour();}
if(hp == 70){health4.visible = on;my_colour();}
if(hp == 60){health5.visible = on;my_colour();}
if(hp == 50){health6.visible = on;my_colour();}
if(hp == 40){health7.visible = on;my_colour();}
if(hp == 30){health8.visible = on;my_colour();}
if(hp == 20){health9.visible = on;my_colour();}
if(hp == 10){health10.visible = on;my_colour();}
if(hp == 0){health11.visible = on;my_colour(); }
if(hp != 100){health1.visible = off; }
if(hp != 90){health2.visible = off; }
if(hp != 80){health3.visible = off; }
if(hp != 70){health4.visible = off; }
if(hp != 60){health5.visible = off; }
if(hp != 50){health6.visible = off; }
if(hp != 40){health7.visible = off; }
if(hp != 30){health8.visible = off; }
if(hp != 20){health9.visible = off; }
if(hp != 10){health10.visible = off; }
if(hp != 0){health11.visible = off; }
if(hp <= 0){death_d();}
}
// my hamoon entity ye ke ma dar moredesh code minevisim ke
// inja health panele moone
function my_colour()
{
while(my == null)
{
wait(1);
}
if(hp == 100)
{
wait(1);
my.lightred = 255;
my.lightgreen = 255; // in ja rangi ro ke flash beine ye health va health digast ro taein mikonim
my.lightblue = 255;
my.lightrange = 600;
}
if(hp == 90)
{
wait(1);
my.lightred = 0;
my.lightgreen = 255;
my.lightblue = 0;
my.lightrange = 600;
}
if(hp == 80)
{
wait(1);
my.lightred = 0;
my.lightgreen = 0;
my.lightblue = 128;
my.lightrange = 600;
}
if(hp == 70)
{
wait(1);
my.lightred = 128;
my.lightgreen = 0;
my.lightblue = 0;
my.lightrange = 600;
}
if(hp == 60)
{
wait(1);
my.lightred = 128;
my.lightgreen = 0;
my.lightblue = 0;
my.lightrange = 600;
}
if(hp == 50)
{
wait(1);
my.lightred = 128;
my.lightgreen = 0;
my.lightblue = 0;
my.lightrange = 600;
}
if(hp == 40)
{
wait(1);
my.lightred = 128;
my.lightgreen = 0;
my.lightblue = 0;
my.lightrange = 600;
}
if(hp == 30)
{
wait(1);
my.lightred = 128;
my.lightgreen = 0;
my.lightblue = 0;
my.lightrange = 600;
}
if(hp == 20)
{
wait(1);
my.lightred = 128;
my.lightgreen = 0;
my.lightblue = 0;
my.lightrange = 600;
}
if(hp == 10)
{
wait(1);
my.lightred = 128;
my.lightgreen = 0;
my.lightblue = 0;
my.lightrange = 600;
}
if(hp == 0)
{
wait(1);
my.lightred = 128;
my.lightgreen = 0; // bebinnid behtare ke in rang ghermez bashe chon dige mordid
my.lightblue = 0;
my.lightrange = 600;
}
}
function death_d()
{
my.pan += 1;
wait(1); // age mordid che etefaghi biyofte in ja code konid
}
// inja code haye khoodetonam mitonid bezarid ke vaghti
// health khodri ya damage che etefaghi biyofte
function health_now()
{
if(add_health >= 1){lose_health = 0;} // makes sure health vars arent both one
if(lose_health >= 1){add_health = 0;} // makes sure health vars arent both one
// age shoma ye health begirid be health_now ye 1 ferestade mishe
// va add_health += 1 mishe
if(add_health >= 1)
{
health_codedown();
}
// age shoma ye health begirid be health_now ye 1 ferestade mishe
// va lose_health += 1 mishe
if(lose_health >= 1)
{
health_codeup();
}
}
|
|
_________________ Age betoonam komak konam khosh hal misham. HF
Kiavash2k@hotmail.com |
|
بازگشت به بالا |
|
|
|
|
|
|
|
|
صفحه 2 از 2 |
تمام ساعات و تاريخها بر حسب 3.5+ ساعت گرينويچ مي باشد برو به صفحه قبلي 1, 2
|
|
شما نمي توانيد در اين انجمن نامه ارسال كنيد. شما نمي توانيد به موضوعات اين انجمن پاسخ دهيد شما نمي توانيد نامه هاي ارسالي خود را در اين انجمن ويرايش كنيد شما نمي توانيد نامه هاي ارسالي خود را در اين انجمن حذف كنيد شما نمي توانيد در نظر سنجي هاي اين انجمن شركت كنيد
|
|
|