Search found 15 matches

by SuperMeijin
Mon Jan 07, 2013 8:36 pm
Forum: Support and Development
Topic: Collision Explanation
Replies: 1
Views: 1593

Collision Explanation

This is my collision function for ii,vv in ipairs(enemies) do -- shot:enemy collision for zombies if CheckCollision(v.x,v.y,16,16,vv.x,vv.y,vv.width,vv.height) then table.insert(remEnemy, ii) table.insert(remShot, i) I dont really understand whats going on in this CheckCollision function but my enem...
by SuperMeijin
Thu Dec 06, 2012 10:21 am
Forum: Support and Development
Topic: How to make a object move to multiple position?
Replies: 8
Views: 3590

Re: How to make a object move to multiple position?

I have solved the problem now thanks for all the help.
by SuperMeijin
Tue Dec 04, 2012 6:54 pm
Forum: Support and Development
Topic: How to make a object move to multiple position?
Replies: 8
Views: 3590

Re: How to make a object move to multiple position?

Ive only got this far and theyre still moving as one function love.mousepressed(x, y, button) if button == "l" then startX = player.x + 80 startY = player.y + 60 destX = x destY = y angle = (math.atan2(destY - player.y, destX - player.x)) bulletDy = shotspeed * math.sin(angle) bulletDx = s...
by SuperMeijin
Sun Dec 02, 2012 8:48 pm
Forum: Support and Development
Topic: How to make a object move to multiple position?
Replies: 8
Views: 3590

Re: How to make a object move to multiple position?

I understand you code but im not sure where to put it?
by SuperMeijin
Sat Dec 01, 2012 5:54 pm
Forum: Support and Development
Topic: How to make a object move to multiple position?
Replies: 8
Views: 3590

Re: How to make a object move to multiple position?

A few questions. What is a local table? And what does ~= do?
by SuperMeijin
Fri Nov 30, 2012 5:38 pm
Forum: Support and Development
Topic: How to make a object move to multiple position?
Replies: 8
Views: 3590

How to make a object move to multiple position?

Ive seen this thread and it works https://love2d.org/forums/viewtopic.php?f=4&t=10822. But want to do this for multiple objects. Heres my code function love.keypressed(key) if (key == " ") and playerDead == false then shoot() end if (key == "j") then spawnEnemies() end end fu...
by SuperMeijin
Thu Nov 29, 2012 8:56 pm
Forum: Support and Development
Topic: Whats a self?
Replies: 4
Views: 2168

Whats a self?

Whats a self or self table i heard about it and have no idea what it is and cant find any information on it? :ultrahappy: :ultrahappy: :ultrahappy:
by SuperMeijin
Mon Nov 26, 2012 9:43 pm
Forum: Support and Development
Topic: Collision
Replies: 3
Views: 1768

Re: Collision

Thanks for explanation very useful. As for the indentation it seems to have gone wrong when I copied it over from notepad++.
by SuperMeijin
Mon Nov 26, 2012 9:20 pm
Forum: Support and Development
Topic: Collision
Replies: 3
Views: 1768

Collision

Hello again I have a problem. This is my collision code for my bullet and enemy local remEnemy = {} local remShot = {} for i,v in ipairs(player.shots) do v.x = v.x + 5 if v.x > 800 then table.insert(remShot, i) end for ii,vv in ipairs(enemies) do if CheckCollision(v.x,v.y,2,5,vv.x,vv.y,vv.width,vv.h...
by SuperMeijin
Sat Nov 24, 2012 3:34 pm
Forum: Support and Development
Topic: Enemy Spawning
Replies: 10
Views: 10853

Re: Enemy Spawning

I know this thread is old but how do I draw a image on these enemies. For my old single enemy I was doing

Code: Select all

love.graphics.draw(zombieimg, zombie.x, zombie.y)