Clearing with "bump.lua": is it possible?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
-
- Prole
- Posts: 5
- Joined: Tue Apr 15, 2014 6:35 pm
- Location: Southampton
- Contact:
Clearing with "bump.lua": is it possible?
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?
The twit who codes.
http://almightybyron.co.uk - Website
http://almightybyron.co.uk - Website
Re: Clearing with "bump.lua": is it possible?
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.
My Tox ID: 0F1FB9170B94694A90FBCF6C4DDBDB9F58A9E4CDD0B4267E50BF9CDD62A0F947E376C5482610
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: Clearing with "bump.lua": is it possible?
Yes, that's the way to do it in bump 1.0I~=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.
When I write def I mean function.
-
- Prole
- Posts: 5
- Joined: Tue Apr 15, 2014 6:35 pm
- Location: Southampton
- Contact:
Re: Clearing with "bump.lua" and map loading bugs.
Brilliant -- thank you! I did have another bug, but I fixed it myself.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.
The twit who codes.
http://almightybyron.co.uk - Website
http://almightybyron.co.uk - Website
Who is online
Users browsing this forum: Bing [Bot] and 5 guests