Ok, so I tried to do the Beginners Tutorial
and I got nearly the result I wanted to. The Problem is that the explosions, that are genereated when a bullet hits a tank or a tank hits the players turret, are a little off the position.
Here is a dropbox-link to the exportet project.
please try it and tell me if the sprites are at the right position or if you have the same problem. (The explossion should appear at the exact position of the tank)
Maybe its only a bug on my computer or I did somthing wrong.
The origin point (correct me if I’m wrong) determines the position where (e.g.) you create an object, it means when you create an object at 100;100, GD will put the object the way its origin is placed in 100;100.
Sometimes is util to place the Origin point at the sprite’s center, so if you create the sprite at X;Y, the sprite will be centered at X;Y.
You are using Object.X(Centre), but you should use Object.PointX(Centre) for points, maybe GD reads this bad syntaxis as 0 (zero)
Then if you want to center the explosion on the tank:
1- Set the origin of the explosion sprite’s first image at the center.
2- Add the action “Create the object Explosion at Enemy.PointX(Centre); Enemy.PointY(Centre)”.
Thank you very much, this helps a lot and it works.
I have one last question. Is it posible to rotate a image around a certain point?
So e.g. I create a new point at an sprite at the right side of it and then I want to rotate around that custom point.
Is there a simple solution? I imagine that I have to work with an extra object or somthing like that?