I followed the platformer tutorial and the enemy dissapears off my screen. I cannot find anything that is keyed or setup any different from the tutorial.
Check these two things:
- Events that delete the enemy object (you can disable the events temporarily and see if the enemies are still deleted).
- The enemy object has the behaviour to delete the object when it goes off-screen (you can de/activate behaviours in the object properties panel)
I don’t have any events setup yet to delete the enemy object. I wanted to make sure the loop animation was working first.
I also did not see anything about the enemy deleting objects when going off the screen. Thanks though. The enemy slides toward the go left object before it disappears.
To better explain what is happening, here is a youtube link to a desktop recording with the game being previewed.
youtube.com/watch?v=EyxeA-0 … e=youtu.be
I think it may have been a glitch with the gdevelop program itself. I deleted the GoLeft and GoRight objects. Then recreated them. Closed the program reopened it and then after resetting all the objects and variables it worked.
Can I check that project (gdg file + resources)?
You can also try a hard refresh on the browser (to clear the game cache), in the game preview tab, press Shift+F5 / Ctrl+F5 or another combination depending on the browser.
Here is the file. I am again having issues with a new enemy I created not working with the same code.
Project.gdg (100 KB)
By resources do you mean the graphics and such?
Here is a link to the games graphics and such if that is what the resources are.
I discovered why my newly created enemy was not working along with another issue that is just as perplexing. So when I resumed work on my game. I copied what I had done with the previous enemy. After hours of reviewing the code and trying everything else I took another look at the tutorial and found the code for the collision between the enemy and goright and goleft. I added that code and it works. But now here is where it gets weird. I looked at my code and there is no collision set between the previous enemy and goright and goleft but it works… So I cleared my browser again and cleared everything but the previous enemy is still working without the collision code.
Never mind. I found the collision code. At least what I lack in brains I am making up for in perseverance .