Search found 55 matches

by 0x72
Wed Jun 24, 2015 3:44 pm
Forum: Support and Development
Topic: Changing lines and color on strings fails
Replies: 3
Views: 1712

Re: Changing lines and color on strings fails

tbh I'm not sure why you put an empty string to the result table in the fist place, I've changed in draw.string if v == "\n" or v == "" then to if v == "\n" then and it works as expected (i.e. it put only as many newlines as there is in the sting, because the later of t...
by 0x72
Wed Jun 24, 2015 9:08 am
Forum: Support and Development
Topic: Changing lines and color on strings fails
Replies: 3
Views: 1712

Re: Changing lines and color on strings fails

v in the loop in the draw.string function is never equal to "\n" So the scan.string fail somewhere: if you add elseif chr == '\n' table.insert(result, chr) to the loop inside scan.string then it'll work The part near `elseif skip then` in the same function assumes that you have "\\n&q...
by 0x72
Thu Jun 18, 2015 8:44 pm
Forum: Support and Development
Topic: My enemies keep moving right.
Replies: 4
Views: 2983

Re: My enemies keep moving right.

Hi! 1) There is probably no reason to divide enemy x and y by 2 when comparing it with centre position of the player (if there is the there is the issue :)) 2) you compare x and y but then only update xvel of the enemy, not sure if enemy is list of enemies (suggested by the loop) or single one (sugg...
by 0x72
Thu Jun 18, 2015 8:37 pm
Forum: Support and Development
Topic: Attempt to compare function with number
Replies: 5
Views: 3292

Re: Attempt to compare function with number

The file you've posted and the repo differ, but it looks like there is something screwed up with your world.update. Try something more like that: function world.update( dt ) for i, v in ipairs(worldData) do v.segmentx = v.segmentx - 0.2 * love.graphics.getWidth() * dt if v.segmentx < 0 then v.segmen...
by 0x72
Thu Jun 18, 2015 9:04 am
Forum: Support and Development
Topic: Attempt to compare function with number
Replies: 5
Views: 3292

Re: Attempt to compare function with number

in line 18 of world.lua you assign love.graphics.getWidth function to v.segmentx, you probably wanted love.graphics.getWidth() there :)