Functions Reference
GameMaker Studio · GML · Groups & clans
gmda_leaveGroup
Leaves the caller's current group.
Asynchronous (result via event)
Signature
gmda_leaveGroup() -> realWhat it does
POSTs /groups/leave, then queues group_left { success, response }. response reports the outcome: status is "left" normally, or "disbanded" if the leaving member was the last one (or the leader) and the group was dissolved.
Parameters
This function takes no parameters.
How to call it
Call it, then read group_left from gmda_pollEvent(). No group_id is needed; it acts on the caller's own group.
Result event: group_left { success, response }
Example
gmda_leaveGroup(); // response.status: "left" or "disbanded"
var e = gmda_pollEvent();
while (!is_undefined(e)) {
if (e.event == "group_left" && e.success) {
show_debug_message("You " + e.response.status + " the group");
}
e = gmda_pollEvent();
}Use cases
- Add a 'Leave clan' button.
- Detect when leaving caused the group to be disbanded.