Search found 40 matches

by Autophoenix
Fri Apr 18, 2014 12:03 am
Forum: Support and Development
Topic: Error when killing enemies
Replies: 5
Views: 2296

Re: Error when killing enemies

Thanks for you both! The code is working. And i'll clean my code.
by Autophoenix
Thu Apr 17, 2014 10:59 pm
Forum: Support and Development
Topic: Error when killing enemies
Replies: 5
Views: 2296

Re: Error when killing enemies

I'm really sorry and I feel awful for what I've done with the rules. How can I delete that post? And thanks for helping me. I'm new to programming (I started at November/2013) and I don't have so many pratice. It's hard for me finding good Lua and Love tutorials in portuguese. Well, I understand wel...
by Autophoenix
Thu Apr 17, 2014 9:53 pm
Forum: Support and Development
Topic: Error when killing enemies
Replies: 5
Views: 2296

Error when killing enemies

In my game the player can throw wrenches at the enemies. But I got a problem: When I have multiple wrenches at the screen, most of the time the wrench don't kill the enemy. And I usually got an error in this. :( In scripts/player.lua I got these variables: wr = {} wr.positionsX = {} wr.positionsY = ...
by Autophoenix
Thu Apr 17, 2014 7:26 pm
Forum: Support and Development
Topic: Objects touching
Replies: 3
Views: 2115

Re: Objects touching

PS: To play the sound multiple times, read this:

viewtopic.php?f=4&t=7706
by Autophoenix
Thu Apr 17, 2014 7:21 pm
Forum: Support and Development
Topic: Objects touching
Replies: 3
Views: 2115

Re: Objects touching

Create a variable in love.load(). Call it 'playsound', for example. function love.load() playsound = false end And then, in update, remove love.audio.play(sound). Replace it with this: if objects.box == objects.box2 then playsound = true end To play the sound: function love.draw() if playsound == tr...
by Autophoenix
Wed Apr 16, 2014 6:18 pm
Forum: Support and Development
Topic: Collision isn't working
Replies: 10
Views: 8653

Re: Collision isn't working

.love:
by Autophoenix
Wed Apr 16, 2014 4:45 pm
Forum: Support and Development
Topic: Collision isn't working
Replies: 10
Views: 8653

Re: Collision isn't working

Ok now I've already fixed it.. but the problem is that when I have multiple wrenches at the screen, most of the time the wrench don't kill the enemy. I'm really pissed off about these errors. In scripts/player.lua I got these variables: wr = {} wr.positionsX = {} wr.positionsY = {} wr.rotations = {}...
by Autophoenix
Tue Apr 15, 2014 8:40 pm
Forum: Support and Development
Topic: Collision isn't working
Replies: 10
Views: 8653

Re: Collision isn't working

I've downloaded that and it worked. What is happening? Would you like an WinRAR file, instead of an love one.
by Autophoenix
Tue Apr 15, 2014 8:06 pm
Forum: Support and Development
Topic: Collision isn't working
Replies: 10
Views: 8653

Re: Collision isn't working

The file is working. Execute the .bat file to directly open main.lua with love2d
by Autophoenix
Tue Apr 15, 2014 5:07 pm
Forum: Support and Development
Topic: Collision isn't working
Replies: 10
Views: 8653

Collision isn't working

In my game, when the player throws an wrench and it colides with the enemy, it should die. But, i don't know why, sometimes when i throw an wrench, the game gives me an error 'Attempt to perform arithmetic on a nil value'. And, can I make a better collision? PS: The error is in the file scripts/enem...