Recursive external event suddenly not working

Before proceeding, please use the forum search feature at the top of the page to check if your question has already been answered.

how to make recursive function without extensions?

hello! i tested yesterday, I was able to make a recursive external event by calling the event inside itself. but today it doesn’t work.

(i’m aware that if there isnt any way to finish the loop, the game will crash, but that is not what is happening. the preview just does not start)

it isnt crashing, it just doesnt play.

This creates an infinite number of events (external events create the same events constantly under the right condition). This can cause crashes.

not what is happening here.

i have a condition that will eventually be checked false

And maybe today you have downloaded the latest version of the engine, and in which you can’t create the same custom object inside a custom object, although you could do that before.

unluckiest day of my life if thats the case.

yesterday when i tried it, it successfully crashed when I made an infinite recusrion of doom. today it looks like gdevelop got ptsd and just won’t do it if it detects a loop

hello! last update.

there is a recursive function (external event) protection that is completely broken.

1: if the recursive function (external event) is infinite, the game crashes

2: if the recursive function (external event) isn’t infinite, the game doesn’t start

this means that the protection, not only doesnt protect you from messing up, it also prevents you from doing the right thing.

removing this feature entirely would be a direct upgrade.

however… the best is to AT LEAST detect the infinite recursion of doom and not play the game.

Are confusing external events with functions?
They are not the same thing:

Recursive external events has never been a thing.

i meant external event in the last post sorry (i edited it now)

I thought that i did the other day, because i tested if the game would crash if i put a recursive external event without a condition, and it sucessfully did crash. This means that recursive external events are allowed right? (otherwise the game would not allow me to run, let alone even call it). paradoxically, if the recursive external isnt infinite, the game detects it and don’t run.

look, gdevelop allows this:

(was that not supposed to exist at all?)

gdevelop is an engine, not a playground. You can do the same thing in any programming language, it wont stop you, but it wont work. Its your job to fix your own bugs, not gdevelop’s

why do you need something recursive when you can just give it no condition and it runs forever?

thats the point.

that would be true if Gdevelop lets you do recursive external events.

but it doesn’t. therofore… according to you, Gdevelop IS a playground. where the daddy (recursive protection) prevents you from doing something “dangerous”.

I wish it (recursive protection) wasn’t there so I could “fix my own bugs”.

this misunderstanding comes from the fact that i said “it successfully crashed when I made an infinite recursion”. But the reason I say “sucessful”, its because this is exacly what an infinite recursion would do. I DO NOT actually want to have an infinite recursion brother. obviously, it crashes. What I ACTUALLY want to do, is doing an recursion thats not infinite (you know… the normal reason why people use recursion). Recursive functions are a thing in coding (perhaps not the most optimized, but still, it should be an option). The reason why the recursive protection fails, its because it doesn’t protect agains infinite recursion, but it blocks the ones that are not infinite (the ones that shouln’t be blocked).

Lastly, for you guy’s information, I am aware that recursive functions can be done in extensions, and thats great. But you can’t do that with external events? strange. (i migrated my recursion thing in extesions. the reason i continue this post isn’t because I have a problem. Its Gdevelop that has a little strange issue)

Am I the only one who think that the recursive protection for external event is broken right now? i planned to post a bug report, but if you guys think its ok like that then… ok then.

preventing recursion that isn’t infinite, then allowing recursion that is infinite…nothing about that bothers anyone?

oh. im quite confused. i thought you actually had a goal like most, but youre just asking why?

and youre right, i just didnt have enough examples.
GDevelop IS like a playground, i just refuse to play in it like one.