Page 319 of 396
Re: Ask a simple question, get a simple answer
Posted: Mon Aug 12, 2019 8:53 pm
by 7Soul
minmay wrote: ↑Mon Aug 12, 2019 8:21 pm
Code: 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
Minmay you're a beast! But where did this "GameMode.damageRecurse" come from?
Re: Ask a simple question, get a simple answer
Posted: Mon Aug 12, 2019 9:12 pm
by THOM
vanblam wrote: ↑Mon Aug 12, 2019 5:56 pm
Silly question, can you spread items across a surface, instead of it all being clumped in one spot?
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
Posted: Mon Aug 12, 2019 9:21 pm
by minmay
7Soul wrote: ↑Mon Aug 12, 2019 8:53 pmMinmay you're a beast! But where did this "GameMode.damageRecurse" come from?
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.
Re: Ask a simple question, get a simple answer
Posted: Mon Aug 12, 2019 10:18 pm
by Isaac
I believe this was mistaking the variable name for being an undocumented game function.
Re: Ask a simple question, get a simple answer
Posted: Mon Aug 12, 2019 11:04 pm
by 7Soul
minmay wrote: ↑Mon Aug 12, 2019 9:21 pm
7Soul wrote: ↑Mon Aug 12, 2019 8:53 pmMinmay you're a beast! But where did this "GameMode.damageRecurse" come from?
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.
It's what Isaac said, I didn't know you could set variables like that
Re: Ask a simple question, get a simple answer
Posted: Mon Aug 12, 2019 11:36 pm
by vanblam
For ItemConstrainBox, is there a part to this that will allow it block thrown objects?
Re: Ask a simple question, get a simple answer
Posted: Tue Aug 13, 2019 12:01 am
by minmay
No, you need ProjectileColliderComponent for that.
Re: Ask a simple question, get a simple answer
Posted: Tue Aug 13, 2019 12:03 am
by vanblam
minmay wrote: ↑Tue Aug 13, 2019 12:01 am
No, you need ProjectileColliderComponent for that.
Ahh I see. Thanks
Re: Ask a simple question, get a simple answer
Posted: Tue Aug 13, 2019 11:25 pm
by vanblam
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.
Re: Ask a simple question, get a simple answer
Posted: Wed Aug 14, 2019 12:39 am
by minmay
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.