Contacts
صفحه اصلی پورتال | صفحه اصلی تالار | ثبت نام | اعضاء | گروه ها | جستجو | پرسش و پاسخ | فروشگاه الکترونیکی | خرید پستی بازی های کامپیوتری





صفحه اول انجمنها -> ساخت بازی های کامپیوتری به وسیله نرم افزار Game Maker -> اسكريپت هاي كاربردي game maker
 

ارسال يك موضوع جديد   پاسخ به يك موضوع ديدن موضوع قبلي :: ديدن موضوع بعدي
برو به صفحه 1, 2, 3, 4  بعدي

اسكريپت هاي كاربردي game maker
نويسنده
پيغام
zaghaghi
بازی ساز
بازی ساز


تاريخ عضويت: 5 شنبه 6 مرداد 1384
تعداد ارسالها: 120


4 شنبه 21 دي 1384 - 21:08
پاسخ بصورت نقل قول
با سلام خدمت تمام دوستان ، در اين تايپيك قصد دارم به كمك دوستان تمام اسكريپت هاي به درد بخور را در اين جا معرفي كنند پيشاپيش از همكاري شما ممنونم
اگر هم توضيح بيشتر يا توضيح فارسي خواستيد تو تايپيك نام تايپيك رو بگيد.
احمد

_________________
becoming number one is easier than remaining number one


اين نامه توسط zaghaghi در 4 شنبه 21 دي 1384 - 21:18 ويرايش شده است.
ارسال  بازگشت به بالا
ديدن مشخصات كاربر ارسال پيغام خصوصي
 

نويسنده
پيغام
zaghaghi
بازی ساز
بازی ساز


تاريخ عضويت: 5 شنبه 6 مرداد 1384
تعداد ارسالها: 120


4 شنبه 21 دي 1384 - 21:09
پاسخ بصورت نقل قول
جدول امتيازات
2قسمت
script name: highscore_fill
This functions tries to fill the highscore list
with 10 starting values. (but only if it is empty)
Event:Game start
arguments: argument 0: top score to use

{
// check whether highscore contains values
if (highscore_value(1) > 0) exit;
// fill in some nice names
nnn = argument0/10;
highscore_add('top shot' ,10*nnn);
highscore_add('excellent' , 9*nnn);
highscore_add('very good' , 8*nnn);
highscore_add('good' , 7*nnn);
highscore_add('reasonable' , 6*nnn);
highscore_add('average' , 5*nnn);
highscore_add('getting better', 4*nnn);
highscore_add('poor' , 3*nnn);
highscore_add('very poor' , 2*nnn);
highscore_add('nothing' , 1*nnn);
}


script name: highscore_draw
This functions draws the highscore list on the screen.
Event: some object
arguments:
argument0: x-position
argument1: y-position
argument2: width
argument3: height (if provided)

{
_oldalign = font_align;
_hhh = 10*string_height('AAA');
if argument3 > 0 _hhh = argument3;
for (_i=0; _i < 10; _i += 1)
{
font_align = fa_left;
draw_text(argument0,argument1+_i*_hhh/10,highscore_name(_i+1));
font_align = fa_right;
draw_text(argument0+argument2,argument1+_i*_hhh/10,string(highscore_value(_i+1)));
}
font_align = _oldalign;
}

_________________
becoming number one is easier than remaining number one


اين نامه توسط zaghaghi در 4 شنبه 21 دي 1384 - 21:12 ويرايش شده است.
ارسال  بازگشت به بالا
ديدن مشخصات كاربر ارسال پيغام خصوصي
 

نويسنده
پيغام
zaghaghi
بازی ساز
بازی ساز


تاريخ عضويت: 5 شنبه 6 مرداد 1384
تعداد ارسالها: 120


4 شنبه 21 دي 1384 - 21:12
پاسخ بصورت نقل قول
خارج شدن از روم بازي
3قسمت
script name: outside_wrap
When an instance moves outside the room, this script
wraps it to the other side of the room.
Event: the object
arguments: None

{
if (x < 0 && hspeed < 0) x = room_width + sprite_xoffset;
if (x > room_width && hspeed > 0) x = -sprite_width + sprite_xoffset;
if (y < 0 && vspeed < 0) y = room_height + sprite_yoffset;
if (y > room_height && vspeed > 0) y = -sprite_height + sprite_yoffset;
}

script name: outside_destroy
When an instance moves outside the room and it
won't move back in, this script destroys it.
Event: the object
arguments: None

{
if (x < 0 && hspeed < 0) instance_destroy();
if (x > room_width && hspeed > 0) instance_destroy();
if (y < 0 && vspeed < 0) instance_destroy();
if (y > room_height && vspeed > 0) instance_destroy();
}

script name: outside_wrap
When an instance moves outside the room, this script
bounces it back into the room.
Event: the object
arguments: None

{
if (bbox_left < 0 && hspeed < 0) hspeed = -hspeed;
if (bbox_right > room_width && hspeed > 0) hspeed = -hspeed;
if (bbox_top < 0 && vspeed < 0) vspeed = -vspeed;
if (bbox_bottom > room_height && vspeed > 0) vspeed = -vspeed;
}

_________________
becoming number one is easier than remaining number one
ارسال  بازگشت به بالا
ديدن مشخصات كاربر ارسال پيغام خصوصي
 

نويسنده
پيغام
zaghaghi
بازی ساز
بازی ساز


تاريخ عضويت: 5 شنبه 6 مرداد 1384
تعداد ارسالها: 120


4 شنبه 21 دي 1384 - 21:14
پاسخ بصورت نقل قول
استپ بازي
script name: game_pause
Displays a message on the screen and waits till the
player presses a key.
Event:…
arguments: argument0 = message color

{
// remember current values
__font_color = font_color;
__font_size = font_size;
__font_style = font_style;
__font_name = font_name;
__font_align = font_align;
// draw the text, refresh the screen and wait
font_color = argument0;
font_size = 16;
font_style = fs_bold;
font_name = 'Arial';
font_align = fa_center;
draw_text(screen_width/2,100,'Game Paused. Press any key to continue.');
screen_refresh();
keyboard_wait();
io_clear();
// restore the settings
font_color = __font_color;
font_size = __font_size;
font_style = __font_style;
font_name = __font_name;
font_align = __font_align;
}

_________________
becoming number one is easier than remaining number one
ارسال  بازگشت به بالا
ديدن مشخصات كاربر ارسال پيغام خصوصي
 

نويسنده
پيغام
Ali
مدیر کل
مدیر کل


تاريخ عضويت: شنبه 20 تير 1383
تعداد ارسالها: 2983
محل سكونت: On the edge


5 شنبه 22 دي 1384 - 02:30
پاسخ بصورت نقل قول
ايده بسيار جالبيه... اين هم چند تا اسكريپت بدرد بخور ديگه :





//
// script name: Shooter Movement
// author name: Chris Johns (CmJ) JChris1984@hotmail.com
//
// description: This is used to move an object while inside the
// room borders, and stop it when no key is pressed.
// It also uses the space key to create a bullet.
//
// arguments: n/a
//
// remarks: Call from / place in the step event.
// Define canshoot as 1 in the creation and alarm[1]
// events.
//
// Version Date Author Remark
// revisions: 1.0 September 23, 2001 (CmJ) Initial creation
// 1.1 November 16, 2001 (CmJ) Adjusted code formatting
//

{
// Movement, stopping when a boundary is hit.
if (keyboard_check(vk_up)) {
direction = 90;
if (y > 0) speed = 12; else speed = 0;
}

if (keyboard_check(vk_down)) {
direction = 270;
if (y < room_height - sprite_height) speed = 12; else speed = 0;
}

if (keyboard_check(vk_left)) {
direction = 180;
if (x > 0) speed = 12; else speed = 0;
}

if (keyboard_check(vk_right)) {
direction = 0;
if (x < room_width - sprite_width) speed = 12; else speed = 0;
}

// Stopping when no arrows are pressed
if not(keyboard_check(vk_up) || keyboard_check(vk_down) ||
keyboard_check(vk_left) || keyboard_check(vk_right)) {
speed = 0;
}

// Shooting Bullets
if (keyboard_check(vk_space) && canshoot) {
instance_create(x-4+sprite_width/2,y+4,bullet); canshoot = 0;
alarm[1] = 10; // set the delay (in steps)
}
}

_________________
پی سی گیمرز - آرشيو بزرگ بازی های کامپیوتری
ارسال  بازگشت به بالا
ديدن مشخصات كاربر ارسال پيغام خصوصي ارسال ايميل ديدن وب سايت كاربر نام كاربري در پيغامگير Yahoo
 

نويسنده
پيغام
Ali
مدیر کل
مدیر کل


تاريخ عضويت: شنبه 20 تير 1383
تعداد ارسالها: 2983
محل سكونت: On the edge


5 شنبه 22 دي 1384 - 02:30
پاسخ بصورت نقل قول
//
// script name: Enemy Respawn
// author name: Chris Johns (CmJ) JChris1984@hotmail.com
//
// description: This will respawn the enemy specified for the
// room 5 times, then it will change rooms. To
// define the enemies for each room, you need to
// add the array with the others like so:
// EnemyType['room name/number'] = 'enemy to use';
// The first room starts at 0.
//
// arguments: n/a
//
// remarks: Call from the step event.
// IMPORTANT:
// You need to define global.DeadEnemy and
// global.EnemyWave as 0 in the creation.
// Increase global.DeadEnemy relative to 1 in the
// destroy event of all enemies used with this
// script.
//
// Version Date Author Remark
// revisions: 1.0 September 23, 2001 (CmJ) Initial creation
// 1.1 November 16, 2001 (CmJ) Adjusted code formatting
//

{
// Define the mosters for each room
EnemyType[0] = enemy1; // first room
EnemyType[1] = enemy2; // second room

// Respawn or Change room
if (global.DeadEnemy == 5) {
global.DeadEnemy = 0;
if (global.EnemyWave < 4) global.EnemyWave += 1;
else room_goto_next();
repeat (5) instance_create(room_width/2-(100-(round(random(200)))),
room_height/2-(100-(round(random(200)))),
EnemyType[room]);
}
}

_________________
پی سی گیمرز - آرشيو بزرگ بازی های کامپیوتری
ارسال  بازگشت به بالا
ديدن مشخصات كاربر ارسال پيغام خصوصي ارسال ايميل ديدن وب سايت كاربر نام كاربري در پيغامگير Yahoo
 

نويسنده
پيغام
Ali
مدیر کل
مدیر کل


تاريخ عضويت: شنبه 20 تير 1383
تعداد ارسالها: 2983
محل سكونت: On the edge


5 شنبه 22 دي 1384 - 02:30
پاسخ بصورت نقل قول
////////////////////////////////////////////////////////////////
// script name: Random Music
// creator: Chris Johns (FlameMage99@aol.com)
// date: August 31, 2001
// updated: N/A
//
// description: Selects a random sound to loop from an array.
// To add or remove more sounds, the random(4)
// should be changed to the last number in the array.
// Don't forget to change the sounds to ones that
// are in your game!
//
// arguments: N/A
//
// remarks: Call from the creation event.
//
//////////////////////////////////////////////////////////////////
{
// bgsound array
bg[0] = BGmusic1;
bg[1] = BGmusic2;
bg[2] = BGmusic3;
bg[3] = BGmusic4;
bg[4] = BGmusic5;
// Choose random bgmusic
sound_loop(bg[round(random(4))]);
}

_________________
پی سی گیمرز - آرشيو بزرگ بازی های کامپیوتری
ارسال  بازگشت به بالا
ديدن مشخصات كاربر ارسال پيغام خصوصي ارسال ايميل ديدن وب سايت كاربر نام كاربري در پيغامگير Yahoo
 

نويسنده
پيغام
Ali
مدیر کل
مدیر کل


تاريخ عضويت: شنبه 20 تير 1383
تعداد ارسالها: 2983
محل سكونت: On the edge


5 شنبه 22 دي 1384 - 02:30
پاسخ بصورت نقل قول
////////////////////////////////////////////////////////////////
// script name: Damage and Explode
// creator: Chris Johns (FlameMage99@aol.com)
// date: August 25, 2001
// updated: September 4, 2001
//
// description: Used to index a sprite depending on damage,
// then switch to a sprite named 'explosion'
//
// arguments: N/A
//
// remarks: Define global.damage in the creation as 0. Call
// this from the step event.
//
//////////////////////////////////////////////////////////////////

{
if (global.Damage < 4) // 4 is the number of hits to take.
{
image_single = global.Damage;
}
else
{
if (sprite_index != explosion)
{
sprite_index = explosion;
image_single = -1;
}
}
if (sprite_index == explosion && image_index == image_number - 1) instance_destroy();
}

_________________
پی سی گیمرز - آرشيو بزرگ بازی های کامپیوتری
ارسال  بازگشت به بالا
ديدن مشخصات كاربر ارسال پيغام خصوصي ارسال ايميل ديدن وب سايت كاربر نام كاربري در پيغامگير Yahoo
 

نويسنده
پيغام
Ali
مدیر کل
مدیر کل


تاريخ عضويت: شنبه 20 تير 1383
تعداد ارسالها: 2983
محل سكونت: On the edge


5 شنبه 22 دي 1384 - 02:30
پاسخ بصورت نقل قول
////////////////////////////////////////////////////////////////
// script name: View Border
// creator: Chris Johns (FlameMage99@aol.com)
// date: September 15, 2001
// updated: N/A
//
// description: This is used to destroy an instance when it
// reaches the border of the view, rather than the
// border of the room. You can replace
// 'instance_destroy()' with which ever action you
// want to use.
//
// arguments: N/A
//
// remarks: Call from the step event.
//
//////////////////////////////////////////////////////////////////
{
if (x <= view_left[0] || y <= view_top[0] ||
x >= view_left[0] + view_width[0] ||
y >= view_top[0] + view_height[0])
{
instance_destroy();
}
}

_________________
پی سی گیمرز - آرشيو بزرگ بازی های کامپیوتری
ارسال  بازگشت به بالا
ديدن مشخصات كاربر ارسال پيغام خصوصي ارسال ايميل ديدن وب سايت كاربر نام كاربري در پيغامگير Yahoo
 

نويسنده
پيغام
Ali
مدیر کل
مدیر کل


تاريخ عضويت: شنبه 20 تير 1383
تعداد ارسالها: 2983
محل سكونت: On the edge


5 شنبه 22 دي 1384 - 02:30
پاسخ بصورت نقل قول
////////////////////////////////////////////////////////////////
// script name: Open file and play
// creator: Vegar Elde (vegarelde@hotmail.com)
// date: November 9 2001
//
//
// description: This script is used to first open a video file
// and then play it internally.You can even
// play Wave mp3 Wma
// and video files if you change the .avi
//
// arguments: N/A
//
// remarks:Now you can make a Video and audio player!!!
//
//////////////////////////////////////////////////////////////////
{
fname = get_open_filename('file(*.avi)|*.avi','')
show_video(fname,false,0);
}

_________________
پی سی گیمرز - آرشيو بزرگ بازی های کامپیوتری
ارسال  بازگشت به بالا
ديدن مشخصات كاربر ارسال پيغام خصوصي ارسال ايميل ديدن وب سايت كاربر نام كاربري در پيغامگير Yahoo
 

نمايش نامه هاي ارسال شده قبلي:   
ارسال يك موضوع جديد   پاسخ به يك موضوع    صفحه 1 از 4 تمام ساعات و تاريخها بر حسب 3.5+ ساعت گرينويچ مي باشد
برو به صفحه 1, 2, 3, 4  بعدي


 
پرش به:  


شما نمي توانيد در اين انجمن نامه ارسال كنيد.
شما نمي توانيد به موضوعات اين انجمن پاسخ دهيد
شما نمي توانيد نامه هاي ارسالي خود را در اين انجمن ويرايش كنيد
شما نمي توانيد نامه هاي ارسالي خود را در اين انجمن حذف كنيد
شما نمي توانيد در نظر سنجي هاي اين انجمن شركت كنيد


unity3d

بازگردانی به فارسی : علی کسایی @ توسعه مجازی کادوس 2004-2011
Powered by phpBB © 2001, 2011 phpBB Group
| Home | عضويت | ليست اعضا | گروه هاي كاربران | جستجو | راهنماي اين انجمن | Log In |