I am working on my plugin and I'd like to trigger condition. I did everything as it was described and as I saw in examples, however it won't trigger my condition.
I decided to dig a bit deeper and to put a couple of console.logs into "preview.js -> Runtime.prototype.trigger" and discovered something: the "trigger" stops on
if (!this.running_layout)[/code:107rxjrk]
When my condition is triggered - this.running_layout equals to null!
OK, I trigger my trigger a second later. Now this.running_layout is not empty, but my trigger wasn't called anyway...
Here is the condition for edit:
[code:107rxjrk]AddStringParam('Lazy section', 'The section you want to spot');
AddCondition(7, cf_trigger, 'Is lazy section loaded', 'HUD', 'Is lazy section <b>"{0}"</b> loaded', 'Check if this lazy section is loaded', 'IsLazySectionLoaded');[/code:107rxjrk]
Then in Conditions I have this:
[code:107rxjrk]Cnds.prototype.IsLazySectionLoaded = function(t){
console.log('IsLazySectionLoaded('+t+')');
return true;
};[/code:107rxjrk]
[ul]
[li]it never gets to this console.log. (notice that I have other conditions, regular, not triggering, and they all work)[/li]
[/ul]Finally I do this somewhere:
[code:107rxjrk]console.log(' => about to trigger...' );
var done = runtime.trigger(cr.plugins_.genericHUD.prototype.cnds.IsLazySectionLoaded, instance, sectionName);
console.log('triggering result: '+done);[/code:107rxjrk]
Needless to say that runtime.trigger returns false...
What am I doing wrong? I also see no error messages, everything is resolved correctly, function "cr.plugins_.genericHUD.prototype.cnds.IsLazySectionLoaded" exists...