Sorry, misread.
But, nevertheless, the "on event recieved" is possible thanks to the same function as on "any enevt".
It seems that you need custom event triggers; i.e. 'on myEvent'. My current solution is tho manually add triggers for everycustom event directly in runtime.js. I use this version of the plugin github.com/JohnnySheffield/C2_Plugins/tree/master/Socket_io-mod_stable
I add a newcondition to the edittime.js, somewherearound line 22:
addcondition('on my trigger', ,mytrigger','blahblah', 'onMyTrigger')
In theruntime.js i add a new eventlistener:
socket["on"]
(
'Mytrigerr',
function(event)
{
//trigger the ondatacondition here if needed runtime.trigger(pluginProto.cnds.OnMyTrigger,instance);
}
);
And finally i add the condition
:
Cnds.onMyTrigger= function(){return true;}
It needs more planning ahead, and is time connsuming, but in my experience it provides muchmore stable code.
Sorry for the formatting, writing on mobile;
Cheers!