Door texture problem

Started by Sandy, February 05, 2018, 05:20:58 PM

Previous topic - Next topic

Sandy

Quote from: jamaicancastle on February 07, 2018, 08:11:39 PM
Well, there aren't that many channels... and they're fairly well-organized. Still a lot though. :P

Anyway. Since you're inheriting from Building_Door, it's probably safest to delete everything you don't need to override. In this case that should be everything except Draw() and the two consts related to it, VisualDoorOffsetStart and VisualDoorOffsetEnd. The latter of those is probably the one you want to change to affect how the door slides open - you may have to experiment with the numbers to get the right result. At a guess, I would say that since you want the door to move .5 grid cells further, it should go to .95f.

The other thing that should have to change is the mesh that I mentioned above inside Draw().
thx man, i found the channel and they are quite helpful.
and ya, i commented out everything except draw and some functions called inside draw.
but it seems Building_door class derives some values from Building class, which i'm gonna need to derive from my custom class. i got a code for that from the discord, but im studying it and seeing how best to use it.

i'll look into mesh after i clear this mess.. lol
i'll create a custom door class and then change it into double door class.

Sandy

i finally did it. made a duplicate of Building_Door class and it works. the doors are opening and closing normally.
now im back to the texture problem. gotta look into that mesh thing.

Sandy

Quote from: jamaicancastle on February 07, 2018, 08:11:39 PM
The other thing that should have to change is the mesh that I mentioned above inside Draw().

i made the door using matrix. 2x1 door, 3x2 door and such. but my pawns get stuck in it. is there a way to solve this problem?
thanks in advance.

mrofa

This might help you, its a source of my door mod, class you should check for textures is CompDoorsDrawer. Idea behind it is that doors use blank texture and proper texture is drawed by comp that is attached to doors. Thrugh there shouldnt be a problem attaching that code to Building_door class
All i do is clutter all around.

Sandy

Quote from: mrofa on February 11, 2018, 03:37:47 AM
This might help you, its a source of my door mod, class you should check for textures is CompDoorsDrawer. Idea behind it is that doors use blank texture and proper texture is drawed by comp that is attached to doors. Thrugh there shouldnt be a problem attaching that code to Building_door class

thanks.. i managed to get the texture to stretch using matrix4x4.. but the main problem is pawns getting stuck in the door.. like everyone who tried to make bigger doors before, i also ran into the pathfinding problem.. at least i think thats what it is..
so, i kinda gave up on the mod idea, until i understand C# coding better..

mrofa

Yehh to make bigger doors you need to spawn doors on both cells. Something like double doors that have drawes that comunicate. Like my x vector is higer than your x vector so im left door part.
All i do is clutter all around.

Sandy

Quote from: mrofa on February 12, 2018, 09:24:00 AM
Yehh to make bigger doors you need to spawn doors on both cells. Something like double doors that have drawes that comunicate. Like my x vector is higer than your x vector so im left door part.

that, definitely, sounds complicated.. Jecrell was making a ProjectHaron mod for bigger doors, but somehow its still unfinished.. lets hope someone actually makes it..

also, this gave me enough lessons, that i made a small QoL mod for myself..

its kinda unrefined now.. but i'll tidy it up over time..