Search found 170 matches

by 7Soul
Wed Nov 11, 2020 2:25 am
Forum: Mod Creation
Topic: Ask a simple question, get a simple answer
Replies: 3753
Views: 1472811

Re: Ask a simple question, get a simple answer

Now my own question: How would I make it so when I press a button it checks if there is certain items on an alcove and if so then it destroys them and spawn a different one? (Like a stick and a rock would turn into a cudgel.) SurfaceComponent triggers script that loops through contents, checks thei...
by 7Soul
Tue Nov 10, 2020 7:13 am
Forum: Mod Creation
Topic: Ask a simple question, get a simple answer
Replies: 3753
Views: 1472811

Re: Ask a simple question, get a simple answer

@IttaBitta I think you need to have a script object named "zim_functions" in your dungeon, then you set it to "external" and point to the script file, and be sure to add it to your init.lua as well
by 7Soul
Sun Nov 08, 2020 8:10 am
Forum: Mod Creation
Topic: Ask a simple question, get a simple answer
Replies: 3753
Views: 1472811

Re: Ask a simple question, get a simple answer

ItemComponent has a setStackSize() method that lets you change the number of items in the stack. Use that to make a stack of pellets (or any other stackable item). dm_lock_coinslot decreases its coinsNeeded counter value by 1 each time a coin is inserted, and when the value reaches 0, it disables i...
by 7Soul
Fri Nov 06, 2020 8:32 pm
Forum: Custom Dungeons
Topic: [Beta] Grimrock 2 Randomizer
Replies: 31
Views: 10885

Re: [WIP] Grimrock 2 Randomizer

Randomized monsters! https://i.imgur.com/O6YYIsh.jpg Monsters are separared in 4 difficulty groups, taking into account HP, protection and evasion. Then within a certain range, their stats get lowered a bit so that they can fall into the other categories For example: Rat Swarms are quite stronger th...
by 7Soul
Fri Nov 06, 2020 6:56 pm
Forum: Custom Dungeons
Topic: [WIP] The Old Nexus 「 Grimrock XL 」
Replies: 44
Views: 35858

Re: [WIP] The Old Nexus 「 Grimrock XL 」

It will come out before Grimrock 3
by 7Soul
Fri Nov 06, 2020 6:47 am
Forum: Mod Creation
Topic: Ask a simple question, get a simple answer
Replies: 3753
Views: 1472811

Re: Ask a simple question, get a simple answer

Sometimes I feel like I use more hacks than actual game functions :P
by 7Soul
Fri Nov 06, 2020 3:48 am
Forum: Mod Creation
Topic: Ask a simple question, get a simple answer
Replies: 3753
Views: 1472811

Re: Ask a simple question, get a simple answer

Even if I don't destroy anything, it still causes the same error
by 7Soul
Fri Nov 06, 2020 12:40 am
Forum: Mod Creation
Topic: Ask a simple question, get a simple answer
Replies: 3753
Views: 1472811

Re: Ask a simple question, get a simple answer

I'm having a problem with

Code: Select all

for _,item in e.monster:contents() do
Image

There's an "if e.monster" before it so e.monster isn't nil, I can even print(e.monster) right before this line
by 7Soul
Thu Nov 05, 2020 11:28 pm
Forum: Mod Creation
Topic: Ask a simple question, get a simple answer
Replies: 3753
Views: 1472811

Re: Ask a simple question, get a simple answer

Isaac wrote:
Thu Nov 05, 2020 11:20 pm
7Soul wrote:
Thu Nov 05, 2020 7:31 pm
So... there's no monster:getAiState()?

This kinda kills my randomizer...
Monsters who are guarding, are usually not moving. ;)
MonsterComponent:isMoving()
I needed something that triggers right when the dungeon loads
by 7Soul
Thu Nov 05, 2020 7:31 pm
Forum: Mod Creation
Topic: Ask a simple question, get a simple answer
Replies: 3753
Views: 1472811

Re: Ask a simple question, get a simple answer

So... there's no monster:getAiState()?

This kinda kills my randomizer...

Edit: I just went through dungeon.lua and got the IDs of the monsters that are set to guarding and used that. Still sucks that I can't grab that state on the fly though :/