Search found 113 matches

by Vimm
Sat Apr 30, 2016 9:57 am
Forum: Support and Development
Topic: [solved] Missing table entry
Replies: 5
Views: 3207

Re: Missing table entry

I'm having trouble with my latest project. When I try to remove an object from my bump.lua world object, I get an error saying it hasn't been added yet -- although it has. To replicate the error, open the game and left-click to shoot at the other object on screen. It will flash and disappear. This ...
by Vimm
Mon Apr 25, 2016 5:37 am
Forum: Support and Development
Topic: Having trouble with simple platform collisions
Replies: 3
Views: 2180

Having trouble with simple platform collisions

in this platform example i made cuz i was bored, i got most things working except for collisions. I can jump from one platform to another just fine, but if i collide with the side or the bottom a platform, im teleported to the top of it. I know why this happens but I cant think of a proper way to fi...
by Vimm
Fri Apr 22, 2016 8:23 pm
Forum: Support and Development
Topic: Anyone need help with small projects?
Replies: 19
Views: 8880

Re: Anyone need help with small projects?

Notice that you don't necessarily need graphics to make cool stuff. You could, for example, investigate sound synthesis - maybe doing synth music. I remember seeing some threads about it some time ago. It's a road few people take, because there's some math and sound is less "flashy" than ...
by Vimm
Wed Apr 20, 2016 9:55 pm
Forum: Support and Development
Topic: [SOLVED]Can't call functions from other class
Replies: 2
Views: 2161

Re: Can't call functions from other class

The problem is you're using global variables inside of your class functions. In game.lua, you write: function Game:new() require "platformSpawn" platform = Platform() end platform is in the global scope by default. Inside platformSpawn.lua, there is also this function: function createPlat...
by Vimm
Wed Apr 20, 2016 9:21 pm
Forum: Support and Development
Topic: [SOLVED]Can't call functions from other class
Replies: 2
Views: 2161

[SOLVED]Can't call functions from other class

I'm trying to get used to using classes so I have a spawn class and a game class, the game class is supposed to call the spawn class's draw function, but it gives me the error "attempt to call function "draw" a nil value"

can anyone tell me what I need to change?
by Vimm
Mon Apr 18, 2016 11:47 pm
Forum: Support and Development
Topic: [SOLVED]Platformer help using multiple platforms
Replies: 2
Views: 1544

Re: Platformer help using multiple platforms

The first thing i would do is put all platforms into a single table, and loop over them For example in your love.load() do something like this: ground = { } table.insert(ground, { x = 0, y = 500, width = love.window.getWidth(), height = 32 } ) table.insert(ground, { x = 0, y = 400, width = 128, hei...
by Vimm
Mon Apr 18, 2016 9:10 pm
Forum: Support and Development
Topic: [SOLVED]emptying a table completely
Replies: 6
Views: 2198

Re: emptying a table completely

zorg wrote:Edit your first post, and put [Solved] before the subject.
:o witchcraft
by Vimm
Mon Apr 18, 2016 8:29 pm
Forum: Support and Development
Topic: [SOLVED]emptying a table completely
Replies: 6
Views: 2198

Re: emptying a table completely

airstruck wrote:Time to read PIL ;)
Haha I know I should but I just can't get around to it XD
How do I change the thread to solved?
by Vimm
Mon Apr 18, 2016 8:17 pm
Forum: Support and Development
Topic: [SOLVED]emptying a table completely
Replies: 6
Views: 2198

Re: emptying a table completely

The most straightforward way would be something like this (assuming you only use numeric indices): for i = 1, #listOfPillars do listOfPillars[i] = nil end If you don't have too many references to that table floating around, you could just do listOfPillars = {} and update any references. ayye that w...
by Vimm
Mon Apr 18, 2016 7:48 pm
Forum: Support and Development
Topic: [SOLVED]emptying a table completely
Replies: 6
Views: 2198

[SOLVED]emptying a table completely

I want to remove every value thats in a table, but I can't figure out how, I tried making a variable that increments everytime something is added to the table, then making a for loop that, if the number of the object spawned is greater than or equal to 0, it removes 1 and decrements, then loops, her...