Ok, I only know a little bit of C++ code. I’m tring to pass a variable from c++ to GDevelop and it didnt work.
I have in the include section
my C++ code looks like this
[spoiler]scene.SetBackgroundColor(100,100,240);
time_t now = time(0);
tm *ltm = localtime(&now);
int varDay;
varDay = ltm->tm_mday;[/spoiler]
Condition:
Action: Do =Variable(varDay) to variable varDay2
I was looking to do a workaround for the time(mday) not working in the html5 version.
I seen GDevelop allowed to use C++ code and assumed I would just need to plug in the needed code.
I only seen the C++ code importation, but see in the documentation you can use JS also. The JS for HTML and C++ for native. But it looks like you need both C++ and JS for html5, am I reading this correct?
Hmm, I tried
Javascript code:
runtimeScene.setBackgroundColor(100,100,240);
var y = 6;
and event action Do = VariableString(y) to the text of NewObject
I also tried GlobalVariableString(y)
I got 0 as the result.