Files
QtGameMaker/help/files/401_17_functions.html
T

46 lines
1.2 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Functions</title>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body background="images/back.gif">
<!--START-->
<h3>Functions</h3>
A function has the form of a function name, followed by zero or more
arguments between brackets, separated by commas.
<p>
<blockquote>
<pre>&lt;function&gt;(&lt;arg1&gt;,&lt;arg2&gt;,...)</pre>
</blockquote>
<p>
There are two types of functions. First of all, there is a huge collection
of built-in functions, to control all aspects of your game. Secondly, any
script you define in your game can be used as a function.
<p>
Note that for a function without arguments you still need to use the
brackets. Some functions return values and can be used in expressions.
Others simply execute commands.
<p>
Note that it is impossible to use a function as the lefthand side of an
assignment. For example, you cannot write
<tt>instance_nearest(x,y,obj).speed = 0</tt>.
Instead you must write <tt>(instance_nearest(x,y,obj)).speed = 0</tt>.
<!--END-->
</body>
</html>
<!-- KEYWORDS
functions
calling functions
arguments
-->