Page 1 of 1
Clearing with "bump.lua": is it possible?
Posted: Fri Apr 18, 2014 5:38 pm
by AlmightyByron
Currently I am working on a game, which uses STI and Bump.lua for map handling and map collision. Now, my problem is with regards bump.lua -- when my LoadMap() function runs, it keeps the old Bump data from the last map and the new map. This is quite a large problem. My question is this: is there any way of clearing Bump rectangles? I've searched through the documentation and forums, but it hasn't come up. If there isn't one: is anyone able to put me in the right direction for coding one?
Re: Clearing with "bump.lua": is it possible?
Posted: Fri Apr 18, 2014 9:40 pm
by I~=Spam
call bump.initialize() again every time you load a new map. Glancing at the code it seems that bump.initialize() clears all items in bump.lua.
Re: Clearing with "bump.lua": is it possible?
Posted: Sat Apr 19, 2014 12:17 am
by kikito
I~=Spam wrote:call bump.initialize() again every time you load a new map. Glancing at the code it seems that bump.initialize() clears all items in bump.lua.
Yes, that's the way to do it in bump 1.0
Re: Clearing with "bump.lua" and map loading bugs.
Posted: Sat Apr 19, 2014 12:55 pm
by AlmightyByron
I~=Spam wrote:call bump.initialize() again every time you load a new map. Glancing at the code it seems that bump.initialize() clears all items in bump.lua.
Brilliant -- thank you! I did have another bug, but I fixed it myself.