E
Edmanbosch
Guest
I was editing one of my scripts when I noticed in the autocomplete that there is a variable named "argument_relative". I can't seem to find any info on it in the documentation. What does "argument_relative" do?
What do you mean? I don't know what "DnD function" you're talking about.I guess it's a boolean that checks if a script is "relative" in the DnD function.
Drag and drop function. In GMS2 you can choose if you want to use GML or DnD functions when you are creating a project. In GMS1 or Game Maker X you can use both.What do you mean? I don't know what "DnD function" you're talking about.
It is possible to make custom libraries of Drag 'n Drop buttons (the standard ones are move, main1, main2, etc.). Each button-block type has a set of visual properties (display text, icon, contents of dialog box) and a snippet of code that it converts to. If "relative" checkbox is enabled for the action, "argument_relative" can be used to determine whether it was checked or not by the user. E.g. a "move instance" action would have code likeWhat do you mean? I don't know what "DnD function" you're talking about.
if (argument_relative) {
x += argument0;
y += argument1;
} else {
x = argument0;
y = argument1;
}
This is interesting - so, in theory, you could make a marketplace release where it has enhanced drag and drop functions beyond what is offered in the standard GMS?It is possible to make custom libraries of Drag 'n Drop buttons (the standard ones are move, main1, main2, etc.).
How interesting. That's pretty cool.It is possible to make custom libraries of Drag 'n Drop buttons (the standard ones are move, main1, main2, etc.). Each button-block type has a set of visual properties (display text, icon, contents of dialog box) and a snippet of code that it converts to. If "relative" checkbox is enabled for the action, "argument_relative" can be used to determine whether it was checked or not by the user. E.g. a "move instance" action would have code like
the global variable serves no use outside the DnD block code.Code:if (argument_relative) { x += argument0; y += argument1; } else { x = argument0; y = argument1; }
XD come on now did you even read that thing?It's a bit odd how there isn't much documentation for this though.
Yes, I do. I tried looking around a bit in both the DnD and GML sections, and I had no luck finding it.XD come on now did you even read that thing?
If you mean that I found it in the docs, I didn't. I found it in the autocomplete. I haven't been able to find any documentation for it.I'm glad there are people still reading the documentation. love it when people pop up with questions that's in the documentation.
If I remember correctly, it's described in the documentation for "extension maker" (program for assembling libraries and legacy-format extensions). Is probably a bug that it shows up in auto-complete as such.It's a bit odd how there isn't much documentation for this though.
What do you mean by "extension maker". Do you mean the extensions resource? I can't seem to find mentions of this anywhere in the docs.If I remember correctly, it's described in the documentation for "extension maker" (program for assembling libraries and legacy-format extensions). Is probably a bug that it shows up in auto-complete as such.