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 Bushstar

Using Impact and Weltmeister from the git repo I've come across the following bug. When trying to load a map that has an entity that uses the function ig.game.spawnEntity() to spawn another standalone entity. Using Firebug I see the following error.

ig.game.spawnEntity(EntityHealth, this.pos.x, this.pos.y) is not a function

The game plays fine and the entities happily spawn what they need. Commenting out the spawnEntity() allows me to use Weltmeister. See the screen shot below for the error.

/>			</div>
		</div>
			<div class=

1 decade ago by Bushstar

I've got a work around which sheds some light on the problem.

The entities were being spawned during the init function of another entity. I have moved the spawning code to .ready() and Weltmeister now loads the maps without problem.

1 decade ago by dominic

Weltmeister executes the init() and draw() methods of entities. If you don&039;t want to run a certain section of code in WM, check for #ig.global.wm:
if( !ig.global.wm ) {
	// not in weltmeister
}
Page 1 of 1
« first « previous next › last »