How do I import variable from file?

The use case is

  • I’m making a cut scene with dialogue using a type-on effect. See GDevelop 5
  • Ideally, the cut-scene dialogue would be stored in a file and imported into a variable.
  • Also, each line should be it’s own variable. (Arrays anyone?)

So how can I do this? or is there a better way?

UPDATE: This seems relevant: Javascript Events. Is it possible to run Javascript Events on Android?

UPDATE: Found the filesystem extension. Unfortunately, it is not available in mobile… so :man_shrugging: File system [GDevelop wiki]

If it’s for dialogues, why don’t you use yarn? It is made for that kind of stuff.

Else you can use the filesystem extension with bouh’s arrays extension I guess.

Yarn? What is yarn? Haven’t heard of it in the context of Gdevelop.

Also, @arthuro555 I do not see any filesystem/array extension in the “Search for New Extensions”

Yarn’s a dialogue system intergrated in GDevelop, it’s quite new though so it’s fair you haven’t seen it.
Here’s the wiki page:

It should be one of the ways to get around not being able to use filesystem extension in mobile.

For yarn see cat’s answer.

For the array extension, search array on the forum to find it. The Filesystem extension is integrated to GDevelop just use the actions provided.

@reina :+1: thanks for the great tip

1 Like