Can you please tell me why it's not working
GameMode.setMaxStatistic(“secrets_found”, 100)
GameMode.setMaxStatistic(“treasures_found”, 0)
are they hardcoded?
Works for me.
That's the same code I posted, just more verbal. As such the same error happensSlava wrote: ↑Wed Dec 25, 2024 8:47 amTry thisCode: Select all
local gem = "blue_gem" for e in self.go.map:entitiesAt(self.go.x, self.go.y + dy) do if e and e.surface then local o = spawn(gem).item e.go.surface:addItem(o) break end end
Code: Select all
local altar = findEntity(altarId)
if altar then
altar.surface:addItem(spawn("blue_gem").item) -- addItem accepts the item
end
Code: Select all
for e in self.go.map:entitiesAt(self.go.x, self.go.y) do
if e.surface then
e.surface:addItem(spawn("blue_gem").item) -- addItem says parameter 1 is not an item
break
end
end
Thank you! I've already figured it out, the problem was something else.Zo Kath Ra wrote: ↑Thu Dec 26, 2024 2:19 pm If you upload a test dungeon to Nexusmods, we can try to reproduce the error.
this is a simple enough question, but nevertheless requires a detailed answer, given that you are, I assume, a novice. Welcome!
setHealth() isn't a good way to do damage - it doesn't do any of the same handling as damage() does.