except with construct's trigger/event system
Here's what happens:
The console log displays the correct number every time I call the expression.
The first time I call the if/display, it returns 0 to both if it is == X and displaying in the textbox.
Every time after the first that I call it, it returns the number it should have returned the last time I called it (the number the console log returned last time).
Here's what I want to happen:
The expression to return the same number as the console.log returns every time.
1 extra question:
Does Construct 2 support an array as a parameter? Or should I make an array by parsing a string parameter? example: "(0, 2, 1, 4)"
The original problem is solved; problem left below:
Hello, new developer here and I'm making a plugin to integrate an existing API with Construct 2.
I figure the most efficant way to make a number of conditions is to make them triggered, but I can't seem to make triggered conditions work, for example, if my plugin had ID: Foo, and I was trying to trigger condition Foobar, I would try:
this.runtime.trigger(cr.plugins_.Foo.prototype.cnds.Foobar, this);
but this line of code appears to break when I export (HTML5, minified), and test the program online.
Some more information:
I'm working with a pf_singleglobal plugin
I've tried putting this code in various places in runtime.js, including pluginProto.Type() and instanceProto.onCreate().