Files
QtGameMaker/help/files/409_06_scripts.html
T

50 lines
1.3 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Scripts</title>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body background="images/back.gif">
<!--START-->
<h3>Scripts</h3>
Scripts cannot be changed during the execution of the game. The scripts are part of the
game logic. Changing scripts would lead to self-rewriting code which very easily leads to
errors. Also there are other ways to achieve this. If you really need to execute a piece
of code that is not known at design time (e.g. from a file) you can use the following
functions:
<p>
<blockquote>
<tt><b>execute_string(str,arg0,arg1,...)</b></tt>
Execute the piece of code in the string str with the indicated arguments.<br>
<tt><b>execute_file(fname,arg0,arg1,...)</b></tt>
Execute the piece of code in the file with the indicated arguments.<br>
</blockquote>
<p>
Sometimes you want to store a script index in a variable and execute it. For this you can
use the following function
<p>
<blockquote>
<tt><b>script_execute(scr,arg0,arg1,...)</b></tt>
Execute the script with index scr with the given arguments.<br.
</blockquote>
<p>
<!--END-->
</body>
</html>
<!-- KEYWORDS
execute_string()
execute_file()
script_execute()
-->