Hi everyone, I’m new on GD. Please help me out; I appreciate it!
For the tanks tutorial, if I have a rocket as the projectile, how do I rotate the rocket so that it fires in the right orientation? RIght now it fires at the right spot, but the ORIENTATION is always with the nose at the top.
For example, it fires to the right like this ^ ^ ^ instead of > > >.
Is there a way to create explosions without the Particles Extension? I am building the app for Android instead of the web.
I am creating an ash png so that after a tank explodes, there is a pile of ash where they were. But the problem is, if two tanks explode in the same spot, the second tank’s ash goes UNDER instead of OVER the first tank’s ash. It’s backwards.
GD default direction (angle = 0) is facing to the right, try modifying the rocket sprite so it faces to the right.
Yes, with sprites, I think the tutorial use sprites for explosions.
By the way, particles are not available for web, only for native platform
Use a variable Ash_Z to store the current ash’s Z order, and increase it after an ash creation. If the ash objects should be always under the tanks, after creating a new ash, add 1 to every tank’s Z order so the ashes never overlap tanks. Of course the tanks should be created with a value greater than Ash_Z:
[code]Conditions: At the beginning of the scene
Actions: Do = 0 to variable Ash_Z (or a value lesser than the tanks Z order in the scene)
Conditions: Rocket collides with Tank
Actions: Create Ash at Tank.X(); Tank.Y()
Do = Variable(Ash_Z) to Z-Order of Ash
Do + 1 to variable Ash_Z
// This is a sub event, I haven’t tested it but should work
Conditions: Consider all Tank objects
Actions: Do + 1 to Z-Order of Tank
Conditions: Conditions to create a new Tank
Actions: Create Tank at X; Y
Do = Variable(Ash_Z) + 1 to Z-Order of Tank