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





صفحه اول انجمنها -> معرفی نرم افزار های ساخت بازی -> 2 عكس زيبا از انجين ds game maker
 

ارسال يك موضوع جديد   پاسخ به يك موضوع ديدن موضوع قبلي :: ديدن موضوع بعدي

2 عكس زيبا از انجين ds game maker
نويسنده
پيغام
mr2face
بازی ساز
بازی ساز


تاريخ عضويت: جمعه 28 اسفند 1388
تعداد ارسالها: 146
محل سكونت: كرج


3 شنبه 21 دي 1389 - 15:50
پاسخ بصورت نقل قول

----------------------------------------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------------
Razz Razz Razz Razz Razz Razz Razz Razz Razz Razz Razz Razz Razz Razz Razz Razz Razz Razz Razz Razz Razz Razz Razz Razz Razz Razz
Question Question Question Question Question Question Question Question Question Question Question Question Question Question Question Question Question Question Question Question Question Question

_________________
id : a.ch_editor
email : a.ch_editor@yahoo.com
-----------------------------------------
tel : 0912 3383875
ارسال  بازگشت به بالا
ديدن مشخصات كاربر ارسال پيغام خصوصي ارسال ايميل نام كاربري در پيغامگير Yahoo
 

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


تاريخ عضويت: جمعه 28 اسفند 1388
تعداد ارسالها: 146
محل سكونت: كرج


3 شنبه 21 دي 1389 - 16:22
پاسخ بصورت نقل قول
Learning DBASThe syntax of DBAS is explained here.

Click here for a complete list of DBAS functions. Also see the last section on this page, titled 'DBAS Tips'.

Commenting
For code to be maintainable in the future and possibly by people other than yourself, it needs to be annotated. You can easily comment in DBAS using the ' symbol, and also REM (short for REMinder).

A commented line is ignored when the code runs. It has only the purpose of assisting you in your development.

Examples
'This line does nothing
'The line below sets the Ball X to 500
BallX = 500
REM Ball X is now 500...
You may only comment an entire line. You cannot add a comment onto the end of a line like in Visual Basic.

Functions
Calling a DBAS function follows the following syntax:

[Function Name]([Argument 1], [Argument 2], [Argument 3] ... )


Examples
Set_X(0, 64)
Set_Camera_XY(Top_Screen, 32, 32)
Declarations
To declare a variable in DBAS, use the following form:

[Scope] [Name] As [Type] = [Value]
•[Scope] is either:
◦Dim, declaring the variable only in the context of the current Script
◦Public, declaring the variable so that all scripts may access it
•[Name] is the name of the variable: Alpha-numeric characters only plus underscores; cannot start with a number
•[Type] is one of the following:
◦Integer - 16-bit number (default type)
◦String - Variable for holding text or charaters, such as "James"
◦Boolean - Holds a true or false value
◦Signed Byte - An Integer with the range -127 to +127
◦Unsigned Byte - An Integer with the range 0 to +128
◦Float - A number which can store a decimal value (these take up lots of memory)
•[Value] is the default value that the variable should have. You may provide a constant or a function.


Examples
Dim MyName As String = "James"
Dim MyAge As Integer = 17
Public SomethingGlobal as Boolean = false
DBAS is truly dynamic. You can skip paramters of the declaration line, such that the following are possible:

'No default value:
Dim MyName As String

'No Type so 'Integer' presumed:
Dim MyAge = 15
Conditions
To check whether a condition is true, use the If statement in DBAS:

If [Expression] = [Value]
'Executing statements
End If
[Expression] can be a variable like X or Y, or it may also be another DBAS function. There is never a need for 2 equal signs.

Examples
'Example 1
If X = 5
'X is 5
End If

'Example 2
If Get_X(0) = 32
'Instance ID 0 has X position of 32
End If

'Example 3
If Test_Chance(10)
'1 in 10...
End If
Notice that in the last example no equals sign or value was provided. You do not have to provide them, and if you do not you are providing the shorthand for 'equals true'. The above should read 'If Test_Chance(10) = true'. An If then ends with 'End If' which signifies the end of the DBAS functions or statements that occur when the 'If' condition is met.

To detect if a condition is false, there are 2 ways to do it:

If Is_Divisible(X, 5) = false
'X is not divisible by 5 - this works
End If

If Not Is_Divisible(X, 5)
'X is not divisible by 5 - this works
End If
They are both exactly the same, so use which one makes most sense to you.

Looping
To Loop in DBAS, use the 'For' statement, accompanied by a 'Next' (just like for If ... End If). You must declare the variable to loop beforehand or the script will not work. A Loop has the following syntax:

For [Variable] = [Start] To [End]
'Use i as the iteration
Next
Example
'Draw a vertical line of A characters
Dim i as Integer
For i = 0 to 10
Draw_Text(Top_Screen, 1, i, "A")
Next
Looping is really as easy as that, and there is not much more to say.

_________________
id : a.ch_editor
email : a.ch_editor@yahoo.com
-----------------------------------------
tel : 0912 3383875
ارسال  بازگشت به بالا
ديدن مشخصات كاربر ارسال پيغام خصوصي ارسال ايميل نام كاربري در پيغامگير Yahoo
 

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


تاريخ عضويت: جمعه 28 اسفند 1388
تعداد ارسالها: 146
محل سكونت: كرج


3 شنبه 21 دي 1389 - 16:24
پاسخ بصورت نقل قول
http://help.dsgamemaker.com/language.php

_________________
id : a.ch_editor
email : a.ch_editor@yahoo.com
-----------------------------------------
tel : 0912 3383875
ارسال  بازگشت به بالا
ديدن مشخصات كاربر ارسال پيغام خصوصي ارسال ايميل نام كاربري در پيغامگير Yahoo
 

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


 
پرش به:  


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


unity3d

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