Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by TommyBs

Hi,

If I override the draw() method of an entity and this entity is in Weltmeister I get an "unable to call toString method" error in the console. This causes weltmeister not to work correctly. Has anyone else noticed this issue or knows of a solution?

Thanks

1 decade ago by mtg101

I'm new to all this but, but I have picked up that WeltMeiste doesn't like some functions, which for me were eval() and getEntitiesByType(). You can avoid this by checking ig.global.wm before doing those sorts of actions in init(), update() or draw(), for example:
init: function( x, y, settings ) {
  this.parent( x, y, settings );
  if( !ig.global.wm ) {
    var ents = ig.game.getEntitiesByType(EntityFnord);
  }
}

1 decade ago by TommyBs

Thanks for the tip, I'll give that a go
Page 1 of 1
« first « previous next › last »