How to batch create a lot of random objects in an event of a scene?

How to batch create a lot of random objects in an event of a scene?

For example: according to a sentence: “what are you doing?”, create the following text object.





Then I click the next button, delete all the above text objects. get the next sentence:
“What I have to do is learning making a game.”
need to split the above sentence to words, each word need to create one text object.
For Ex:

The sentence will be the variable of the scene.

Best Regards

this does not seem random to me. I think the simplest way is to create this is just create the text objects, and fill them with the text. when you are do it in a single event, you may call it “batch” if you want. and you aren’t need any variable for this.

but if you insist using a variable, than you need to use a variable structure. than create each child separately with a repeat event. like this:

it will only work if you brake down your sentences manually:

Hi, Gyuszko

Thank you very much for your reply.

There are a lot of English sentences in a text file.
They are stored line by line.
[1] Read all of the sentences from the text file.
[2] Loop each sentence of all
[3] Split the sentence string to words.
[4] Create each word as new text object in random position.
[5] Need the player to drag & drop words to original order.
[6] Click Next Button,Delete all the old text objects, Goto [2] .
That’s all.

I don’t know how GDevelop will split a sentence in to words for you. I’m afraid you have to do this. but experienced users correct me if I’m wrong.

1 Like

Thank for your reply.

1 Like