-
Notifications
You must be signed in to change notification settings - Fork 0
/
GameMaker_Language.htm
24 lines (22 loc) · 8.3 KB
/
GameMaker_Language.htm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head><script type="text/javascript" src="assets/import/jquery-3.6.1.min.js"></script><script type="text/javascript" src="assets/import/layer/layer.js"></script><script type="text/javascript" src="assets/import/pangu.min.js"></script><link rel="stylesheet" type="text/css" href="assets/import/layer/layui_btn.css"><link rel="stylesheet" type="text/css" href="assets/import/layer/layui_col.css"><link rel="stylesheet" type="text/css" href="assets/import/layer/theme/default/layer.css"><link rel="stylesheet" type="text/css" href="assets/import/main.css"><script>let str;removeHtml=function(t){return t=(t=(t=(t=t.replace(/(<([^>]+)>)/gi,"{}")).replace(/\r\n/g,"\n")).replace(/\n/g,"")).replace(/ {2,}/g," ")},retHtml=function(t){return t.match(/(<([^>]+)>)/gi)},setTranslator=function(t,n,a){let e;e=a?t.attr(a):t.html();let l=n[removeHtml(e)];if(null!=l&&l.length){n=retHtml(e);let o=0;n&&n.forEach(function(t,n){var a=l.replace("{"+o+"}",t);l=a===l?l.replace("{}",t):a,o++}),a?t.attr(a,l):t.html(l)}},noTranslationState=function(){return"true"==window.localStorage.getItem("noTranslationState")},noTranslationStateToggle=function(){window.localStorage.setItem("noTranslationState",!noTranslationState())},addNoTranslationStateButton=function(){$(".header").length&&$(".header").append(`
<button style="
float: right;
font-size: 16px;
padding: 4px 12px;
"
onclick="
window.location.replace('gmmt://'+document.location.hash)
"
>打开编辑器</button>
<button style="
float: right;
font-size: 16px;
padding: 4px 12px;
"
onclick="
noTranslationStateToggle();
location.reload();
event.stopPropagation();
"
>切换翻译</button>
`)},removeExtensionFromHash=function(t){return t.replaceAll("#t=","").replaceAll("%2F","/").replaceAll(".htm","")},$(function(){if(addNoTranslationStateButton(),noTranslationState())return!1;$("div.footer a,h4,caption,blockquote").each(function(){setTranslator($(this),json_global)}),$("p,h1,h2,h3,td,li,a,div.dropspotnote,figcaption,.expandtext").each(function(){setTranslator($(this),json)}),$("th,.warning,.important,.optional").each(function(){setTranslator($(this),json_global)}),$(".header").length&&(window.setInterval(function(){$("#toc-panel a:not('isTranslate')").each(function(){$(this).addClass("isTranslate"),setTranslator($(this),json_global)}),$(".GlossDefinitionText:not('isTranslate')").each(function(){$(this).addClass("isTranslate"),setTranslator($(this),json_global)})},250),console.log("成功啦!现在正在疯狂翻译菜单中!")),$(".tooltip").each(function(){setTranslator($(this),json_global,"title")})}),document.addEventListener("DOMContentLoaded",()=>{pangu.autoSpacingPage()})</script><script type="text/javascript" language="JavaScript">function reDo(){innerWidth==origWidth&&innerHeight==origHeight||location.reload()}4==parseInt(navigator.appVersion)&&"Netscape"==navigator.appName&&(origWidth=innerWidth,origHeight=innerHeight,onresize=reDo),onerror=null</script><style type="text/css">p.WebHelpNavBar{text-align:right}</style><script type="text/javascript">gCommonRootRelPath=gRootRelPath=".",gTopicId="8"</script><script type="text/javascript" src="./template/scripts/rh.min.js"></script><script type="text/javascript" src="./template/scripts/common.min.js"></script><script type="text/javascript" src="./template/scripts/topic.min.js"></script><script type="text/javascript" src="./template/scripts/topicwidgets.min.js"></script><script type="text/javascript" src="./whxdata/projectsettings.js"></script><link rel="stylesheet" type="text/css" href="./template/styles/topic.min.css"><link rel="stylesheet" type="text/css" href="./template/Charcoal_Grey/topicheader.css"><meta name="topic-status" content="Draft"><link rel="stylesheet" type="text/css" href="assets/css/default.css"><script src="../assets/scripts/main_script.js"></script><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="generator" content="Adobe RoboHelp 2022"><title>GameMaker Language</title><meta name="topic-status" content="Draft"><link rel="stylesheet" type="text/css" href="assets/css/default.css"><meta name="template" content="assets/masterpages/Manual_Page.htt"><meta name="rh-authors" content="Gurpreet S. Matharoo"><meta name="brsnext" value="Drag_And_Drop/Drag_And_Drop_Index.htm"><meta name="brsprev" value="Additional_Information/Obsolete_Functions.htm"></head><body><div class="topic-header rh-hide" id="rh-topic-header"><div class="logo"></div><div class="nav"><div class="title" title="GameMaker Language"><span>GameMaker Language</span></div><div class="gotohome" title="Click here to see this page in full context"><a href="#" onclick="rh._.goToFullLayout()">Click here to see this page in full context</a></div></div></div><div class="topic-header-shadow rh-hide" id="rh-topic-header-shadow"></div><div></div><div><h1 id="h">GameMaker Language</h1><p>You can use GameMaker Language to program your games in two different ways: by placing blocks to "write" code visually, or by writing code manually.</p><p>The first option, <a href="Drag_And_Drop/Drag_And_Drop_Index.htm">GML Visual</a>, is best suited for beginners and hobbyists who want to get started making their own games quickly.</p><p>The second option, <a href="GameMaker_Language/GameMaker_Language_Index.htm">GML Code</a>, allows you to harness the full power of GameMaker Language by writing your code manually.</p><p>While <span data-keyref="GML_Visual">GML Visual</span> is easier to start with, <span data-keyref="GML_Code">GML Code</span> is still an easy-to-use programming language with powerful features (<a href="GameMaker_Language/GML_Overview/Script_Functions.htm">Functions</a>, <a href="GameMaker_Language/GML_Overview/Method_Variables.htm">Methods</a>, <a href="GameMaker_Language/GML_Overview/Structs.htm">Structs & Constructors</a>, etc.).</p><h2>Creating Visual/Code Scripts</h2><p>You are asked to choose between <span data-keyref="GML_Code">GML Code</span> and <span data-keyref="GML_Visual">GML Visual</span> on creating a new Object event, a new Script asset, or anything else that results in the creation of a script:</p><p><img class="center" src="assets/Images/Scripting_Reference/GML_Visual_Code_Dialog.png">In addition to the choice between <span data-keyref="GML_Code">GML Code</span> and <span data-keyref="GML_Visual">GML Visual</span>, this window contains two checkboxes:</p><ul class="colour"><li><strong>Don't ask again for this project</strong>: When this is enabled, it sets the "Default scripting language" <a href="Settings/Game_Options.htm">Game Option</a> to your new selection, so you are not asked to choose again for the current project.</li><li><strong>Don't ask again ever</strong>: When this is enabled, it sets the "Default scripting language" <a href="Setting_Up_And_Version_Information/IDE_Preferences/Language_Preferences.htm">Preference</a> to your new selection, so you are never asked to choose again, for <em>any</em> projects.</li></ul><h2><span data-keyref="GML_Visual">GML Visual</span></h2><p>This is GameMaker's <strong>Visual Scripting</strong> method that uses blocks of <em>actions </em>which are chained together to create your game's logic. The following sections explain how to use these actions:</p><ul class="colour"><li><a href="Drag_And_Drop/Drag_And_Drop_Overview/DnD_Overview.htm">GML Visual Overview</a></li><li><a href="Drag_And_Drop/Drag_And_Drop_Reference/DnD_Reference.htm">GML Visual Reference</a></li></ul><h2><span data-keyref="GML_Code">GML Code</span></h2><p>Write GML code using functions, variables and other coding constructs, and create your game's logic. The following sections explain how to code using GML:</p><ul class="colour"><li><a href="GameMaker_Language/GML_Overview/GML_Overview.htm">GML Code Overview</a></li><li><a href="GameMaker_Language/GML_Reference/GML_Reference.htm">GML Code Reference</a></li></ul><p> </p><div class="droptext" data-targetname="drop_down9"><ul class="colour"></ul></div><p> </p><div class="footer"><div class="buttons"><div class="clear"><div>Back: <a href="Content.htm">GameMaker Manual Index</a></div><div> </div></div></div><h5><span data-keyref="Copyright Notice">© Copyright YoYo Games Ltd. 2024 All Rights Reserved</span></h5></div></div></body></html>