Search found 5 matches
- Sun Nov 17, 2019 4:11 pm
- Forum: General
- Topic: Rotate a picture of a Zombie
- Replies: 4
- Views: 4654
Re: Rotate a picture of a Zombie
Hi, raidho3. I tried what you say, but that don't resolved my problem. Here is part of my code: for i, inimigo in ipairs(inimigos) do local direcao = math.atan(inimigo.x-hitman.x,inimigo.y-hitman.y) love.graphics.draw(inimigo.img, inimigo.x, inimigo.y, direcao) end This FOR are in love.draw(), the v...
- Sun Nov 17, 2019 2:38 pm
- Forum: General
- Topic: Rotate a picture of a Zombie
- Replies: 4
- Views: 4654
Rotate a picture of a Zombie
Hi guys, i've got a game where in the center of the screen have a person who shoots the enemies(zombies) that are randomly spawned around the screen. So, the problem is that these pictures are not aiming the center, where the person is. Anybody have a clue how to do that? Thanks for reading
- Sat Nov 16, 2019 2:33 pm
- Forum: General
- Topic: Random Enemies Spawning
- Replies: 4
- Views: 5442
Re: Random Enemies Spawning
You don't have misundertood,it is exactly what I'm trying to say it. I get it the ideia. Thanks for your help
- Sat Nov 16, 2019 1:06 pm
- Forum: General
- Topic: Random Enemies Spawning
- Replies: 4
- Views: 5442
Re: Random Enemies Spawning
Thanks, pgimeno! I understanded about spawning in random places, but if I want to spawn random enemies, could I just add a ID for each one and in the hour of calling the function spawnEnemy check if the random number between the ID interval is the same as one ID of a random enemy. Does that sound ri...
- Fri Nov 15, 2019 8:56 pm
- Forum: General
- Topic: Random Enemies Spawning
- Replies: 4
- Views: 5442
Random Enemies Spawning
Hello guys, i've got a project of a topdown-shooter game that I'm developing, but I dont know how to spawn random enemies in random places of the screen. I have seen some other topics about spawning objects but none of these helped me. Anybody could help me out? Thanks for reading