What about array object and looping?

Instead of doing like this:


Can I do this?(edited)

Is there any alternative for it? If not, then
It would be so great for making that type of apps or something (maybe a big game).

[trying to give an idea]

var games = [
. “Limbo”,
. “Mass Effect 2”,
. “Red Dead Redemption”,
. “StarCraft”
];
for(var i = 0; i<=games.length; i++) {
. //Modifies the Text object like this
. …“games[i]”;
. //Changing the y pos each time
. … text.Y()+50;
}
// I know it’s a simple thing for you

hi you can group objects there is an icon in gdevelop
There are no arrays on gdevelop but you have structures variables that can work as an array
You could also JavaScript code

Ok,
Suppose that I’ve created a variable in javascript code. Then how can I get the value of that in actions?
the following doesn’t work:

“continue.VariableString(hello)” also don’t work.

take a look here
http://wiki.compilgames.net/doku.php/gdevelop5/events/js-code
it says
Note that in the code, you have access to a variable named runtimeScene . The variable, “runtimeScene”, represents the scene being played.

I have never used jscript on gdevelop so I can’t help more

I think you can do all that using the variables, conditions and actions of GDevelop. :blush:

But how? can you please give an example?

Search for “text” on this page:

And read:
http://wiki.compilgames.net/doku.php/gdevelop5/all-features/variables

1 Like