Thank you and thank you!
Now I have my first fully functional enemy!
Still one of the original problems remain. :D The reason I rejected the patrol function was that the physics didn’t work right. One thing still remains, ”the floating body”. When I stomp the enemy with the detective it plays the animation of captured enemy. Problem is, the captured enemy floats few pixels in the air. It otherwise obeys the gravity.
I think the problem is the graphic or the function ”play animation”. The sprite should be same size, the captured one just has more empty pixels on top. It almost feels like the pixels from top go to the bottom. :O
The frames are all different small images, not from a tileset.
Here is a pic:
0_1559371608714_9A9FA9D0-3C80-4156-8DA3-1E64BC53E89F.jpeg
EDIT: Spawn object seems to work well enough, it just needs the captured object to be hidden out of sight in the level.