Minmay you're a beast! But where did this "GameMode.damageRecurse" come from?minmay wrote: ↑Mon Aug 12, 2019 8:21 pmCode: Select all
onDamage = function(self, champion, damage, damageType) if GameMode.damageRecurse then GameMode.damageRecurse = nil return true elseif damage > 1 then damage = math.max(1,damage-champion:getLevel()) GameMode.damageRecurse = true champion:damage(damage,"pure") return false end end
Ask a simple question, get a simple answer
Re: Ask a simple question, get a simple answer
Re: Ask a simple question, get a simple answer
By the mechanics of the vanilla game: no.
But you can use GameObject:setSubtileOffset(x, y) to change the placement of an item on a surface. You can use this to place items at their starting location in the game and you can write a function that places an object every time it is put on a surface...
Re: Ask a simple question, get a simple answer
Umm...my brain I guess? Naming variables is hard.
It would be cleaner to use an upvalue instead of sticking it in GameMode of course, but I don't remember whether that hook gets serialized (if it does, using an upvalue in it wouldn't work) and was too lazy to check, so I put the variable in GameMode instead.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Re: Ask a simple question, get a simple answer
I believe this was mistaking the variable name for being an undocumented game function.
Re: Ask a simple question, get a simple answer
It's what Isaac said, I didn't know you could set variables like thatminmay wrote: ↑Mon Aug 12, 2019 9:21 pmUmm...my brain I guess? Naming variables is hard.
It would be cleaner to use an upvalue instead of sticking it in GameMode of course, but I don't remember whether that hook gets serialized (if it does, using an upvalue in it wouldn't work) and was too lazy to check, so I put the variable in GameMode instead.
Re: Ask a simple question, get a simple answer
For ItemConstrainBox, is there a part to this that will allow it block thrown objects?
Re: Ask a simple question, get a simple answer
No, you need ProjectileColliderComponent for that.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Re: Ask a simple question, get a simple answer
I'm using minmays modified blender import/export and I'm trying to use the foliage utilities, I can't seem to get it to work anymore, I've used it in the past on my grass and it worked properly. I made a tree with some branches and its animated, I added the custom_normal vertex group to the model, created an empty that I labeled tree_normal and I put it about 10 units away from the tree. In Grimrock I still have the same black parts on some branches ( I have moved that tree_normal in every which way possible). Now when I removed the vertex group and the empty, I still have the same exact black branches, its as tho the foliage utilities have no effect what so ever. Is there something I'm missing?
Here is my blender set up.
Here is my blender set up.
Re: Ask a simple question, get a simple answer
If you're getting "black parts", that doesn't sound like an issue with the default normals in the first place. Are you sure these faces are pointing outwards?
I confess I never tested the custom normal part after I made my changes to the plugin, so you could try using the original version of the plugin too in case I managed to break it.
I confess I never tested the custom normal part after I made my changes to the plugin, so you could try using the original version of the plugin too in case I managed to break it.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.