• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

HTML5 How can i send parameters to GML Script using JS ?

hello everyone !

i am trying send simple parameters to GML Script using GoogleChrome Console or JavaScript Extension ...

I tested all these ways, but none worked ... :

GM 2 SCRIPT -
Code:
/// @function gmcallback_hello(id);
/// @description  Output "Hello World" to the debug console
/// @param {real} instance_id The unique instance ID value of the instance to check.

show_debug_message("Hello World - "+argument0);
// show_debug_message("Hello World - "+argument[0]);
JS CODE -
Code:
1º -  window[func].apply(null, 12345);

 2º -  var cback = window[func];
    cback.apply(null, 12345);

 3 -    window[func](12345);

 4 - gml_Script_gmcallback_hello(12345);
someone know how can i send string or integer parameters to GMScript using JavaScript ?

example screenshot : https://prnt.sc/mfrlvy
 
Top