Hello everybody, I’m running into a huge issue, I’ve been scratching my head to find a solution but found no way to solve this problem.
As shown in the video, the enemy is being affected by gravity only when it is within the screen’s bounds. This method works nicely only horizontally, which means that if the player falls downs, just like in the video, the enemy falls WHILE the tiles are not created, so it just gets stuck in the ground and falls down out of the level.
Also there’s another issue where some “platformSwitch” (big green tiles with a white P) are visible, while some others are not. This is really strange.
Not sure if I understand your questions properly. The monsters have offscreen physics on? The entire map is loaded at the start before the monsters? Confused on what your questions was for the enemy part. I do believe Dyson added a new feature that better supports stuff from falling through the floor when he gives the newest update out.
That does seem strange with the big green tiles with white P, I would go to their tile and make sure all the settings like isVisible = false, etc and all that is done in the Tiled properties, so all their tiles have the same thing. After just get their obstacle key just like the MTE castleDemo example and can double set them there if it still doesn’t work in the program. But should be able to make them non visible through just the Tiled properties, assuming you want them all not visible?
Yo pull off your .zip ASAP!! It holds plugins that would ruin people’s business’s if you know what I mean.
I am so far the only downloader, but I am checking it out.
EDIT: the noDraw = true I put on your P tile and it makes them all invisible, MTE documentation says if you set it true it should still hold all of its tile properties.
I had no clue about the physicsOffScreen true being a big performance drain, I’m having a few performance problems myself and this is big info for me. I’m very interested in how you got the offscreenphysics to work better with performance, how do you determine to start moving if the screen reaches them?
local layerObjects = mte.getLayerObj({layer = 2})
layerObjects[1].isVisible = false
That hides the tiles but keeps all the properties of them! Just choose the layer, but if you wanted more control I’m sure one of those get “commands” will do the task. Could have a special layer for those special tiles you want to be hidden. Since MTE can use like a million layers, that should be fine?
*** Could you please go into more on how you stop a sprite from moving if not on the viewable screen or start the movement if on the viewable screen. If you wanna PM thats cool too! ***
I added the 2 middle lines inbetween your game.lua, I just started over your .zip planted those 2 lines in and it hides your entire “devant” layer. The layer number is for the way the layers are in Tiled. And you can still see the static wall objects even though they are hidden so it keeps the properties of the tiles.
The layer=3 doesn’t hide the “devant” layer. I had to change it to 4.
And the layer I want to hide is the first in Tiled, the “switchs” layer. So I changed it to 5 randomly and I can see it hides only the “E” tiles, not the “F” nor “P”. So what’s happening, why doesn’t it hide the whole layer ?
You sure the F and P are on that same exact layer? Cuz its hiding everything for me, I just tried it with all your tiles and it hides them. The only thing I noticed is if it has bodyType Dynamic and you try to hide it, it falls because of the gravity in your game and it draws them falling even though they should be invisible. But works perfectly for bodyType static, could send Dyson a message to send a bug for the dynamic part and falling with gravity.
Yup, I’m sure of that, because when I hide the “switch” layer in Tiled, F, P and E hide. Also, concerning the bug, I think it’s normal as it keeps the physics properties. What you see I surely because of the “hybrid” physics mode…
So have you got any idea concerning this problem ?
Not sure if I understand your questions properly. The monsters have offscreen physics on? The entire map is loaded at the start before the monsters? Confused on what your questions was for the enemy part. I do believe Dyson added a new feature that better supports stuff from falling through the floor when he gives the newest update out.
That does seem strange with the big green tiles with white P, I would go to their tile and make sure all the settings like isVisible = false, etc and all that is done in the Tiled properties, so all their tiles have the same thing. After just get their obstacle key just like the MTE castleDemo example and can double set them there if it still doesn’t work in the program. But should be able to make them non visible through just the Tiled properties, assuming you want them all not visible?
Yo pull off your .zip ASAP!! It holds plugins that would ruin people’s business’s if you know what I mean.
I am so far the only downloader, but I am checking it out.
EDIT: the noDraw = true I put on your P tile and it makes them all invisible, MTE documentation says if you set it true it should still hold all of its tile properties.
I had no clue about the physicsOffScreen true being a big performance drain, I’m having a few performance problems myself and this is big info for me. I’m very interested in how you got the offscreenphysics to work better with performance, how do you determine to start moving if the screen reaches them?
local layerObjects = mte.getLayerObj({layer = 2})
layerObjects[1].isVisible = false
That hides the tiles but keeps all the properties of them! Just choose the layer, but if you wanted more control I’m sure one of those get “commands” will do the task. Could have a special layer for those special tiles you want to be hidden. Since MTE can use like a million layers, that should be fine?
*** Could you please go into more on how you stop a sprite from moving if not on the viewable screen or start the movement if on the viewable screen. If you wanna PM thats cool too! ***