Use 3rd party JS libraries (including JQuery), call Javascript functions, access object properties and methods. Implement game objects, and algorithms in Javasc...
Is there any Callback-Function?
Example. I have a timeout-function at javascript. After the timeout, i will call a condition in construct 3:
setTimeout(timeisover,1000); function timeisover() { var x = 0; if(x==0) { // Call Construct3-Condition with Argument CallbackFunctionToConstruct3(x); } }
setTimeout(timeisover,1000);
function timeisover() {
var x = 0;
if(x==0) {
// Call Construct3-Condition with Argument
CallbackFunctionToConstruct3(x);
}
I hope you understand what i mean.. :)
Well you sure can't call a condition.
But you can fire a trigger of some Construct Plugin. You can also call a Construct Function (Function plugin type) from javascript. See c2_callFunction here scirra.com/tutorials/1078/bridging-js-and-c2 (c3_callFunction for C3 runtime). You can totally use it as a callback.
Feel free to text me if you have any problems with that.
Ok, i have tested it (with function-plugin), but don't work for me. I don't know why!?
Uncaught TypeError: Cannot read property 'GetEventSheet' of null
at C3.EventSheetManager._FastTrigger (eventSheetManager.js:1)
at C3.Runtime.FastTrigger (runtime.js:1)
at C3.Plugins.Function.Instance.FastTrigger (sdkInstanceBase.js:1)
at C3.Plugins.Function.Instance._InvokeFromJS (instance.js:1)
at b (instance.js:1)
at blob:https://preview.construct.net/45780e92-7585-4277-b9cd-4455a80a4f1b:26
Have you a example-file for this?
Can you send me the project file that reproduces this?
I have found the solution. The problem comes only, when i trigger too fast the function.
What do you mean too fast? Too fast after what? Maybe you found the solution. But I'd like to know if something goes wrong. Can you send me the project file where the problem reproduces?