## Search found 44 matches

Sun Nov 27, 2011 3:47 am
Forum: Support and Development
Topic: camera movement?
Replies: 5
Views: 765

### camera movement?

I have created a simple game. I want the camera to move where ever the smiley face goes, so that I can make large levels. The code is here if you want to take a look..... function love.load() world = love.physics.newWorld(0, 0, 650, 650) --create a world for the bodies to exist in with width and hei...
Sun Oct 23, 2011 1:50 am
Forum: Support and Development
Topic: Shooting left and right?
Replies: 3
Views: 464

### Re: Shooting left and right?

Thanks guys, I've got it fixed.
Wed Oct 19, 2011 1:49 am
Forum: Support and Development
Topic: Shooting left and right?
Replies: 3
Views: 464

### Shooting left and right?

I have made a smiley face shoot a smaller smileyface upwards, but can't figure out how to make it shoot left and right. here's the code: function love.load() world = love.physics.newWorld(0, 0, 650, 650) --create a world for the bodies to exist in with width and height of 650 world:setGravity(0, 700...
Thu Oct 13, 2011 12:13 am
Forum: Support and Development
Topic: how do I attach a smiley face to a bullet?(resolved)
Replies: 5
Views: 687

### Re: how do I attach a smiley face to a bullet?

ok yeah sorry. that's cause getX() doesn't apply to your shots. you should just be able to use .x and .y. try this: love.graphics.draw(shotb, v.x, v.y, 0, 1, 1, shotb:getWidth()/2, shotb:getHeight()/2) also, you don't need this line local s = objects.ball.shots hope this helps... Works! thank you v...
Wed Oct 12, 2011 11:15 pm
Forum: Support and Development
Topic: how do I attach a smiley face to a bullet?(resolved)
Replies: 5
Views: 687

### Re: how do I attach a smiley face to a bullet?

as far as I can see all you need to do is: in love.draw(), instead of love.graphics.rectangle("fill", s:getX(), s:getY(), 2, 5) have love.graphics.draw(shotb, s:getX(), s:getY(), 0, 1, 1, shotb:getWidth()/2, shotb:getHeight()/2) I tried that and it gave me the same error "attempt to call method get...
Wed Oct 12, 2011 9:38 pm
Forum: Support and Development
Topic: how do I attach a smiley face to a bullet?(resolved)
Replies: 5
Views: 687

### how do I attach a smiley face to a bullet?(resolved)

I have taken the physics tutorial, and made it so that the ball is a smiley face (smileyface.png), and it can shoot bullets upwards. What I wan't to do is attach a smaller picture of a smiley face to the bullet. I have the smaller picture (shotb.png), but can't figure out how to attach it. code: fun...
Mon Sep 26, 2011 11:06 pm
Forum: Support and Development
Topic: How do I Make an object shoot with physics?
Replies: 6
Views: 626

### Re: How do I Make an object shoot with physics?

The way you had it set up was weird. This works for me (but I do not recommend it): function love.load() world = love.physics.newWorld(0, 0, 650, 650) --create a world for the bodies to exist in with width and height of 650 world:setGravity(0, 700) --the x component of the gravity will be 0, and th...
Mon Sep 26, 2011 2:38 am
Forum: Support and Development
Topic: How do I Make an object shoot with physics?
Replies: 6
Views: 626

### Re: How do I Make an object shoot with physics?

thelinx wrote:Like tentus said, you need to replace objects.ball.shots.x and objects.ball.shots.y with coordinates from Body:getPosition.
I replaced
objects.ball.shots.x = 200
objects.ball.shots.y = 200
with
objects.ball:getPosition()
still not working....
Sun Sep 25, 2011 9:52 pm
Forum: Support and Development
Topic: How do I Make an object shoot with physics?
Replies: 6
Views: 626

### Re: How do I Make an object shoot with physics?

bump
Fri Sep 23, 2011 2:54 am
Forum: Support and Development
Topic: How do I Make an object shoot with physics?
Replies: 6
Views: 626

### How do I Make an object shoot with physics?

I have taken the coding from the physics tutorial, and added to it as to make a shot shoot upwards. My only issue is that the shots will only fire from coordinates, not from the position of the ball. How do I Attach my shoot function to the physics body? ----------------------------------- Code: fun...