Page 369 of 396

Re: Ask a simple question, get a simple answer

Posted: Tue Dec 15, 2020 11:54 pm
by THOM
Wow - finally. The candle item works and is finished.

Thanks minmay!

Re: Ask a simple question, get a simple answer

Posted: Thu Dec 17, 2020 5:31 pm
by ratman
I have a few new questions: what does the reflection tile drawing mode do? And also what is the point of an occluder and what is it used for?

Re: Ask a simple question, get a simple answer

Posted: Thu Dec 17, 2020 7:23 pm
by Zo Kath Ra
ratman wrote: Thu Dec 17, 2020 5:31 pm I have a few new questions: what does the reflection tile drawing mode do? And also what is the point of an occluder and what is it used for?
> what does the reflection tile drawing mode do?

Skuggasveinn has explained it in LoG2 editor tutorial - part 4 - Creating water inside your dungeon @ 4:25

If you haven't already done so, I suggest downloading all of his LoG2 tutorials with https://youtube-dl.org/

Re: Ask a simple question, get a simple answer

Posted: Fri Dec 18, 2020 1:36 am
by 7Soul
ratman wrote: Thu Dec 17, 2020 5:31 pm And also what is the point of an occluder and what is it used for?
Add a wall to your level (like a ruins wall, preferably outdoors with lots of stuff around) and disable the model to see for yourself what it does ;)

Re: Ask a simple question, get a simple answer

Posted: Fri Dec 18, 2020 2:05 am
by Isaac
It occludes.

Re: Ask a simple question, get a simple answer

Posted: Fri Dec 18, 2020 3:30 am
by ratman
So what is the point of it? is it for performance so it doesn't load the models the player usually wouldn't see or something?

Re: Ask a simple question, get a simple answer

Posted: Fri Dec 18, 2020 4:37 am
by 7Soul
Exactly, every game does it

Re: Ask a simple question, get a simple answer

Posted: Sat Dec 19, 2020 9:11 pm
by Skuggasveinn
ratman wrote: Fri Dec 18, 2020 3:30 am So what is the point of it? is it for performance so it doesn't load the models the player usually wouldn't see or something?
They are super important, some engine create their own mesh from models to use for vision culling, the Grimrock 2 engine uses models that you have to define as an Occluder model for that specific task.

Perhaps long overdue but I decided to record a short video about occluders and there function and how you can see what they are about. Hope it helps.
https://youtu.be/xAj65MM2lww

Skuggasveinn.

Re: Ask a simple question, get a simple answer

Posted: Thu Dec 24, 2020 1:01 am
by ratman
Two more questions: first, if the player creates a party, changes the position of champion 1 and champion 2, then imports that party
into a different mod, would the game remember the original Ordinal or make a new one based on the party's formation when it was imported? Second, is there some sort of offset function that can be used repeatedly on the same object? Such as using something like setSubtileOffset but if you call it twice on the same object it would move it twice? Something like this?

Code: Select all

teleporter_1:setSubtileOffset(2, 2)
but if I call it again, it would move it again? (or alternatively, could I do something like

Code: Select all

local offset = teleporter_1:getSubtileOffset()
teleporter_1:setSubtileOffset(offset + 1)

Re: Ask a simple question, get a simple answer

Posted: Thu Dec 24, 2020 1:27 am
by Zo Kath Ra
ratman wrote: Thu Dec 24, 2020 1:01 am Second, is there some sort of offset function that can be used repeatedly on the same object? Such as using something like setSubtileOffset but if you call it twice on the same object it would move it twice? Something like this?

Code: Select all

teleporter_1:setSubtileOffset(2, 2)
but if I call it again, it would move it again? (or alternatively, could I do something like

Code: Select all

local offset = teleporter_1:getSubtileOffset()
teleporter_1:setSubtileOffset(offset + 1)
GameObject:getSubtileOffset() returns two values:
- x subtile offset
- y subtile offset
( see https://www.lua.org/pil/5.1.html )

If you want to change the subtile offset by some amount, you could do it like this:

Code: Select all

local x, y = teleporter_1:getSubtileOffset()
teleporter_1:setSubtileOffset(x + 0.1, y + 0.1)