Page 1 of 1

STI and Bump setup issues

Posted: Thu Nov 19, 2020 3:48 pm
by kuzika
this is my code to initialize bump world by using STI map

Code: Select all

function love.load()
require 'conf';
require 'vars';
bump = require 'maps/bump';
loc= require("maps/lv1")
local sti = require "maps"
world = bump.newWorld(16)
test = love.audio.newSource("audio/03 Towering Chieftain.mp3","static")
map = sti(loc ,{"bump"})
map:bump_init(world)
end
and this is the error that came to me
Error

main.lua:11: attempt to call method 'bump_init' (a nil value)


Traceback

main.lua:11: in function 'load'
[C]: in function 'xpcall'
[C]: in function 'xpcall'

Re: STI and Bump setup issues

Posted: Thu Nov 19, 2020 7:35 pm
by sphyrth

Code: Select all

-- Change This
map:bump_init(world)

-- To This
map:box2d_init(world)

Re: STI and Bump setup issues

Posted: Fri Nov 20, 2020 12:18 am
by zorg
sphyrth wrote: Thu Nov 19, 2020 7:35 pm

Code: Select all

-- Change This
map:bump_init(world)

-- To This
map:box2d_init(world)
I mean, sti does have bump support as well, so that's not really a helpful answer :v