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 DaveVoyles

I have some odd bug (or really, more likely due to my incompetence) where if I add sound effects to my entities, Weltmeister stops working.

I take 2 approaches with launching the editor:

1) Run WAMP (from Win8 x64 w/ Admin) and browse to "LocalHost/Shooter/Weltmeister.html"

or

2) Open my website from Visual Studio 2012, hit debug (F5) and that brings me to "http://localhost:60320/Shooter/weltmeister.html"


If I remove the sound effects from my entities, running from #1 is fine. I still receive these odd errors when running from option 2 though:

Uncaught Unresolved (circular?) dependencies. Most likely there's a name/path mismatch for one of the listed modules:
weltmeister.weltmeister (requires: weltmeister.edit-entities)
weltmeister.edit-entities (requires: weltmeister.entities)

Uncaught Failed to load entity list via glob.php: SyntaxError: Unexpected token <


Anyway, point is, my game plays fine, but in the level editor it won't load if I have SFX. I comment them out, and boom, editor and game both work fine.

Last night, I did add a reference to "impact.sound" in both my Weltmeister.js and edit-entities.js files and it worked fine all night!

Today, I boot it up, and no dice. Go figure. I've just commented out the sounds and will continue to edit from there. What do you think the issue is though?

1 decade ago by DaveVoyles

I actually think I figured out the problem.

I read another thread somewhere here, in which someone had a similar problem, and Dominic responded with the fact that it has to do with Weltmeister using a different version of the Game class when creating objects in the level editor.

So, when I try to place an object in the editor, it tries to initialize everything there; including my sound effects.

To get around that, wrap this check around any objects which may draw that issue:

if (!ig.global.wm) { // Not in WM?
{
...........
Sound effects code + whatever else
............
}
Page 1 of 1
« first « previous next › last »