Call Events Extension

This extension allows you to call events!

Think of it like functions in Python. You can use an action to call a certain name (like “damage_player”) and you can add a condition that has the same name. It allows for a more consistent work style instead of copy and pasting code or using bunches of variables.

Download it here

Your link lead to an empty project.

No, its in the releases. There really isnt any source code to a gdevelop extension, but they could put it there too.

That’s relatively incorrect, the source is the json of the exported extension.

It’s pretty important for it to be in the github structure so people can vet it isn’t malicious (or stolen, but I doubt anything like that in this case)

y…yes, but, the release is the json…so. i meant “really isnt source code” because there is no other code than the source, i was saying it didnt really matter.

Ah, I follow you now.

But that said, the release is a zip file. Generally the source should be readily available and viewable on github without downloads.

Can it be explained to me, a mere mortal, what it actually does?
I mean, how should I use it in the project and why should I use the event’s call by name?.. and send JSON data through it.?

From what I understand, it seems like it creates some kind of shortcut for the event… without having to paste it again.

Alrighty! I’m bad at docs lol so here’s a breakdown

does a dance

Ok, seriously though.
You send an “event name” that only exists in the extension. Then you add a condition with the same event name. To send JSON, grab your variable (or JSON), then use ToJSON() to turn it into JSON, then send it through the action.

Then use CallEvent::LatestCallEventJSON() to get this JSON. It’s good if you want to send Structures or Arrays through the call.

Sorry for all of the confusion guys BTW, this is my first time sharing an extension, and publishing it on GitHub. Thanks for reading this.

Sorry for ANOTHER post from me. I’ve added the extension to the source code! Feel free to vet it out if you are into that.

Isnt that what custom extensions and functions are for? Works excatcly as you’ve described.


Using custom objects with object-functions instead of default sprites/3D objects with regular scene or external evens simply referencing them can be even more usefull: