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

9 years ago by landoom

Recently i have been adding some Entities to my Levels. Something weird happened. Whenever i add an Entity in Weltmeister by pressing Spacebar then I
choose an entity from the list of Entities i have made .... nothing shows up on the screen except for the drop down menu on the right that usually shows up when you click on an entity So its like its invisible but if i go to a another level then it works.

9 years ago by Joncom

Let's see the draw function for the entity not always drawing correctly in Weltmeister.

9 years ago by landoom

It does not seem like there is a problem with the draw function because usually all that's in the draw function is the this.parent. And sometimes i don't even have a draw function

9 years ago by Joncom

If you don't have a draw function, then it's falling back to the parent already. So that's probably not your issue (assuming the parent is ig.Entity)...

Hmm... So you're saying the entity is invisible, however you can see it if you: save the level, load another, and then come back?

9 years ago by landoom

So... i have 3 Levels. in the 1st and 2nd levels the Entities are invisible but in the 3rd level they are visible

9 years ago by Joncom

1) Is it a specific type of entity that is encountering this issue? For example, your EntityPlayer, EntityEnemy... Or is it all entities?

2) If the issue only occurs for a specific type of entity, please share the code for it here.

3) Have you checked your console for errors while viewing the 1st and 2nd levels?

9 years ago by landoom

When i pull up the Console it says Uncaught TypeError: Cannot read property 'pos' of undefined. then if i click in to the link thats on the right of the console it takes me to the part of the code in the entity.js were its talking about the distanceTo function

9 years ago by Joncom

I suspect one of your entities is responsible for that error. You could try making a new level and adding different entities to it until the error occurs...

Or your could start deleting entities one by one from your /lib/game/entities/ folder, and check if it fixes the problem. I think Weltmeister gracefully removes entities from a level when it can't find the .js file for it.

9 years ago by landoom

COOL! thank you joncom :)) so much!
i got it to work by only having the bosses draw their health bars when you're playing the game

9 years ago by Joncom

Nice!
Page 1 of 1
« first « previous next › last »