Search found 7 matches

by WhiteLocke
Mon Mar 13, 2017 12:42 pm
Forum: Support and Development
Topic: HUMP timer and bump
Replies: 1
Views: 1888

Re: HUMP timer and bump

Solved this one. Other tweaks aside, in this format, it needs to be surrounded by function() end. In other words: Timer.during(1, function() world:update(player, x, y + 1) end, etc. Also, had to include delta time (dt) to get what I was trying to do to work, but that's another issue.
by WhiteLocke
Mon Mar 13, 2017 10:48 am
Forum: Support and Development
Topic: HUMP timer and bump
Replies: 1
Views: 1888

HUMP timer and bump

I want to use the HUMP timer function Timer.during(delay, during, after) but when I try to make they delay function a world:update() it says delay is nil. I think this is cause timer doesn't know what world is? Here's the code: Timer.during(1, world:update(player, x, y + 1), function () Timer.clear(...
by WhiteLocke
Mon Mar 06, 2017 12:59 pm
Forum: Support and Development
Topic: Problem destroying entities with HUMP
Replies: 0
Views: 1440

Problem destroying entities with HUMP

Super beginner here, please excuse the absolute mess of my code. I'm trying to use HUMP to switch rooms(maps) but quickly ran into the problem that objects stick around in the new map. So I need to use leave() to erase the objects, right? Only when I do remove them from the bump.lua world, it is sti...
by WhiteLocke
Wed Feb 22, 2017 7:05 am
Forum: Support and Development
Topic: How to find object collided into in bump.lua??
Replies: 4
Views: 3502

Re: How to find object collided into in bump.lua??

Update on this, finally made a better way to streamline matching dialogue to names and realized names need to be strings to be recognized. The background is still going black when dialogue is drawn though.
by WhiteLocke
Wed Feb 22, 2017 1:44 am
Forum: Support and Development
Topic: How to find object collided into in bump.lua??
Replies: 4
Views: 3502

Re: How to find object collided into in bump.lua??

Okay well it's all kind of referencing each other so here is the full code (it's really messy and the dialogue part is kind of broken right now) Main.lua: bump = require 'bump' require 'drawWords' local world = bump.newWorld() local level = {elems = {}} function level:addElem(x, y, w, h, drawLambda)...
by WhiteLocke
Tue Feb 21, 2017 12:17 pm
Forum: Support and Development
Topic: How to find object collided into in bump.lua??
Replies: 4
Views: 3502

Re: How to find object collided into in bump.lua??

Hey! I figured it out:

Code: Select all

cols[i].otherRect.x, cols[i].otherRect.y
But now when that's passed to the function that draws the dialogue box, the background disappears. Any ideas why?
by WhiteLocke
Tue Feb 21, 2017 11:50 am
Forum: Support and Development
Topic: How to find object collided into in bump.lua??
Replies: 4
Views: 3502

How to find object collided into in bump.lua??

Hey so I'm pretty awful at programming so be patient. Basically, I want bump.lua to tell me which NPC I bumped into so I can have him say his scripted words over his head when "a" is pressed. Right now I have this which obviously I know is wrong but you can see my thinking... if love.keybo...