Hi, im trying to create a shooter whereby the player is at the bottom of the screen, space is the hash to fire, and the bullets need to spawn and shoot upwards. I cant figure out how to do this and the defold tutorials wont work for some reason. Im new to defold, and also extremely bad at coding so please dumb anything down for me ahaha. thank you!
Exactly, there is literally the tutorial for beginners on making a space shooter game!
For shooting with Space, after watching the tutorial, you might be able to replace my automatic shooting with just handling the space key (as it was introduced for arrows) to shoot them
If you will have questions then, let us know!
Also take a look at this example:
This code didn’t work for me but it is perfect for what i need. I have sorted the issue, marginally, but my sprite also wont show up when i build the game, it has a collision object and script attached to say when hit, delete, but wont show up when i build.
When i move my bullet sprite around the main collection it also changes whether the bullet moves upwards or downwards when i build it? why is this?
I am watching them, but for some reason when I move my sprites around on the collection it completely changes what they do. Those videos are a god send though. I have copied every step but my enemy sprite doesnt load when the game is built.
You should look at the position of your Game Objects and the sprites attached to them. You should set the z value to 0 for everything (for now). That might help
You should also set all rotations to (for game objects and sprites) 0 and see if that helps. And remember, you can rotate the sprite without rotating the game object. If the Game object is moving in the right direction, but the sprite is facing the wrong direction, that will help.
Another random pitfall: collision objects accidentally set to dynamic will fall off the screen.