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 matthewjames

Hello all, first post here!

I made a Transport Entity that worked in using the code below. ##ig.game.loadLevel(LevelInterior1);##

I quickly realized I need a better way of passing which level to go back to, so I decided to pass the variable through a key in weltmeister.

Example Key: level: LevelInterior1

New code: ###check: function ( ) { ig.game.loadLevel(this.level); }###

When I try to go through a Transport I get the following errors:
game.entities.player is already defined - Idk why this happens.
TypeError: Cannot read property 'length' of undefined

Thank you all for your help!

Matthew

1 decade ago by Joncom

You may want to try using ig.game.loadLevelDeferred instead.

1 decade ago by matthewjames

Thank you for the reply but I seems to not help. I still get the following error. Am I doing something wrong passing the name of the level to load through a key in weltmeister??

##2403 Uncaught TypeError: Cannot read property &039;length' of undefined#
Page 1 of 1
« first « previous next › last »