RedditPP Mascot

RedditPP

r/themoddingofisaac • … • u/Flylph

How would I go about doing things that involve the level class?

Basically I'd like to know how to make active items that do things like reveal the map or manipulate angel room chance. I've tried two things, and both have returned errors

function testmod:use_Test( )

Level:ShowMap()

end

returns: [INFO] - [Test] Error in PostUseItem call: ...s/My Games/Binding of Isaac Afterbirth+ Mods/test/main.lua:7: attempt to call a nil value (method 'ShowMap')

and

l=Level()

function testmod:use_Test( )

l:ShowMap()

end

returns: [INFO] - [Test] Error in PostUseItem call: ...s/My Games/Binding of Isaac Afterbirth+ Mods/test/main.lua:8: attempt to call a table value (global 'Level')

Can somebody explain what I'm doing wrong?

— 0