Is it still possible to make your own action blocks in Game Maker?
I am dabbling in GM again after many years. I remember you could make your own action blocks (I think as extensions), but I cannot find any documentation on how to do this...
(I know how to make extension functions, but I specifically want to make a DnD block).
Is this still possible? (And indeed, can someone confirm whether this was indeed possible? I'm pretty sure I made a few, and remember making the icons for the blocks... but maybe it's a false memory).
(I know how to make extension functions, but I specifically want to make a DnD block).
Is this still possible? (And indeed, can someone confirm whether this was indeed possible? I'm pretty sure I made a few, and remember making the icons for the blocks... but maybe it's a false memory).
Comments
Could you, perhaps, give a better description of what you are trying to achieve?
I've never read anything about being able to do that. But I find out stuff about GM really slowly :P. I think your best bet is to ask @Dislekcia - he seems to be our resident Blood Magic GM user :).
edit: erk. Ninja'd by Ben.
(Anyone interested, it is here: http://sandbox.yoyogames.com/make/extensions - it's the Library Maker that ships with that.)
I know it's possible to do with extentions, but don't believe that there anything native in studio that would allow for it, but as Ben said. @Dislekcia would probably know the best.
[Edit] Wow lotsa posts appeared before mine :p
I'll poke around with the extension maker a bit later on to see if I can get anything going with it (want to package up my screenshake system)
But as far as only being able to return doubles and strings. All variables in GM are doubles are strings. Variables in GM that point to an object: just have a double of the object's ID.
While this can often be a pain in the ass (like wanting a vector) it does make certain facets of GML easier given that you only ever deal with two variable types.
(And yes, I know what you mean with vectors and such... I had a little brain-seize trying to reframe all my problems without the luxuries offered by C#. One surprising thing though is that my code is still shorter somehow... I guess it must be all the abstraction clutter that accumulates in a C# program. Or maybe it's just a temporary illusion; we'll see.)
The basic idea is: 1) Export your functions that you want to access via actions as a GML file; 2) make a new action library, and export it; 3) make an extension (I used the external extension maker) that includes the GML from step 1 and the library from step 2; 4) install the extension in whichever project you want to use it. The new actions should now be available in the DnD editor.
(Also, you need not define the functions you access in step 3).