Can you please tell me why it's not working
GameMode.setMaxStatistic(“secrets_found”, 100)
GameMode.setMaxStatistic(“treasures_found”, 0)
are they hardcoded?
Ask a simple question, get a simple answer
Re: Ask a simple question, get a simple answer
Test version of my Generations of Kings mod
https://drive.google.com/file/d/1DOTiuP ... drive_link
https://drive.google.com/file/d/1DOTiuP ... drive_link
- Zo Kath Ra
- Posts: 940
- Joined: Sat Apr 21, 2012 9:57 am
- Location: Germany
Re: Ask a simple question, get a simple answer
Works for me.
If you upload a test dungeon to Nexusmods, we can try to reproduce the error.
Merry Christmas!
Re: Ask a simple question, get a simple answer
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
This works:
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