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 Hareesun

Hey,

I’m in the process of attempting to write a plugin, and I need to get the ig.game.collisionMap.width and ig.game.collisionMap.tilesize values.

Whenever I try the console always returns –
TypeError: 'null' is not an object (evaluating 'ig.game.collisionMap’)

Any suggestions?
Thanks!

1 decade ago by dominic

Probably this: http://impactjs.com/forums/help/when-is-ig-game-available!?

The fix is coming in 1.18! Till then, use the ig.game = this; workaround.

1 decade ago by Hareesun

I’d looked and tried that. Seems to only return ‘undefined’ for both values. Kinda strange.

Turns out I’m a fool and had it looking to get the values BEFORE the level had loaded so it was unable to get the actual value back.

Thanks! :)

1 decade ago by fugufish

@Hareesun had a similar problem , and loading the level first worked!
Page 1 of 1
« first « previous next › last »