I made a game to test what I learned, with a blue tank that is the player, it has a cannon and shoots when you press "1", and a red tank that follows you. The problem is that the bullet that the player shoots does not appear. I checked the entire code and didn't find what was wrong.
I'll leave here the .zip file with the entire game. The code that makes the bullet work is only in the files main.lua, player.lua, bullet.lua and canhao.lua. I put comments by the codes explaining some functions.
Bullets shooted doesn't appear
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Bullets shooted doesn't appear
- Attachments
-
- lovegame.zip
- (10.29 KiB) Downloaded 130 times
- CogentInvalid
- Prole
- Posts: 27
- Joined: Sat Dec 14, 2013 12:15 am
Re: Bullets shooted doesn't appear
In Bullet:draw() you're calling love.graphics.newImage. Instead you should call love.graphics.draw.
Who is online
Users browsing this forum: No registered users and 5 guests