Search found 911 matches

by Ranguna259
Sat Jul 06, 2013 2:46 pm
Forum: Support and Development
Topic: Replicating Physical Bodies
Replies: 4
Views: 1537

Re: Replicating Physical Bodies

Before this: bullet[0]={} , you need this: bullet={} . Also, you can leave out: [code]bullet[0]={} bullet[0].b=love.physics.newBody(world, player.x+51, player.y, 'dynamic') bullet[0].s=love.physics.newRectangleShape(5,1) bullet[0].f=love.physics.newFixture(bullet.b, bullet.s) bullet[0].b:setBullet(...
by Ranguna259
Sat Jul 06, 2013 1:01 pm
Forum: Support and Development
Topic: Replicating Physical Bodies
Replies: 4
Views: 1537

Re: Replicating Physical Bodies

Okay. The "bullet code" is now only run once. What you want is spawn a bullet each time, so you'll need to create a new body (etc) for every shot fired. Also, love.mouse.isDown is probably not the best way to do this, because if you accidentally hold the left mouse button for more than a ...
by Ranguna259
Sat Jul 06, 2013 12:36 pm
Forum: Support and Development
Topic: Replicating Physical Bodies
Replies: 4
Views: 1537

Replicating Physical Bodies

Hello again lovers :3 I was creating a bullet code with physics and I wanted to know what I could do to replicate physical bodies and draw them all on screen. Say this is the bullet code: bullet={} bullet.b=love.physics.newBody(world, player.x+43.5, player.y, 'dynamic') bullet.s=love.physics.newRect...
by Ranguna259
Wed Jun 26, 2013 4:31 pm
Forum: Support and Development
Topic: ChainShape Help
Replies: 5
Views: 1964

Re: ChainShape Help

You've said that "a" is 1 in your exemple but I don't think it goes like that, I think that "a" is (1,2,3) but when you use it in chainshape or any other code without the "unpack()" code, chainshape will identify (1,2,3) as the first coodinate and not just 1. löve migh...
by Ranguna259
Wed Jun 26, 2013 10:43 am
Forum: Support and Development
Topic: ChainShape Help
Replies: 5
Views: 1964

Re: ChainShape Help

Wouldn't this place the table as first parameter, where a number is expected, and leave all the other parameters to nil? On a more general side, I would like to know, how I can extract values of a table into the parameter list of a function. (either like in this example, or e.g. {200,100,50} into l...
by Ranguna259
Tue Jun 25, 2013 10:59 pm
Forum: Support and Development
Topic: ChainShape Help
Replies: 5
Views: 1964

ChainShape Help

Hello everyone, so I've been trying to do a ChainShape but it doesn't seem to work, here's how I coded it. I have a variable, a, which has all the shape's coordinates from the first to the last: a=10,10,20,30,30,40,40,10 And I want to create a ChainShape with that variable, like this: shape.b=love.p...
by Ranguna259
Fri Jun 21, 2013 8:45 pm
Forum: General
Topic: I can't seem to put together a variable
Replies: 2
Views: 1233

Re: I can't seem to put together a variable

You cannot store multiple return values in a single variable unless that variable is a table. So this: a = b, c effectively just does the same as this: a = b as the second value has nowhere to go. If you want to add values to a table, you need to put in a few table.insert calls. Something like this...
by Ranguna259
Fri Jun 21, 2013 6:57 pm
Forum: General
Topic: I can't seem to put together a variable
Replies: 2
Views: 1233

I can't seem to put together a variable

So I was trying to do this little love program that saves coordinates to a variable but for some reason it isn't saveing them right. Basically whenever you press the left mouse button the coordinates of the mouse's current position are saved to pointx pointy[a] And once there are more than 3 coordin...
by Ranguna259
Wed Jun 19, 2013 1:23 pm
Forum: General
Topic: Notepad++ Highlights and Auto-Completion
Replies: 4
Views: 6924

Notepad++ Highlights and Auto-Completion

So I was searching around the net for the LÖVE plugins(APIs and highlights) for Notepad++ and found lua auto-complete&Highlights and LÖVE auto-complete&Highlights but the problem is that they weren't together meaning that if you were programing in LÖVE, notepad++ wont highlight Lua codes. Wi...
by Ranguna259
Wed Jun 19, 2013 12:15 pm
Forum: General
Topic: Notepad++ Auto-Complete Config for LÖVE 0.6.2
Replies: 23
Views: 38327

Re: Notepad++ Auto-Complete Config for LÖVE 0.6.2

NM, did it. Here are the links, it has Lua 5.1 and LÖVE 2D 0.8.0: https://mega.co.nz/#!1xp1lQJD!RdozDVXHLs7ogSgTBmYcwzSmrgFAETLfz7xedDcQfcM And here's the highlight .xml for notepad++ with both LÖVE and Lua (modded by me): https://mega.co.nz/#!pgBRzBoT!NcZ9dn3hASO-zi8r7mZ_bEVUiaBujxB21tgUKMMlrNQ (Go...