To make custom ladder working in game you need set up extension for your ladder in ytyp (CExtensionDefLadder)
It works either for embedded collision and for static.
First ofcorse you need to create ladder with embedded collision or you can use vanilla ladder (mostly they dont have embedded collisions) and create embedded or static collision for it.
Then create ytyp using neos script (https://github.com/carmineos/gtav-maxscripts)
Set flag 0 for ladder (<flags value="0"/>)
Now copy extension from here and replace <extensions/> in your ytyp with copied values.
Now you need to change 5 entries: name, offsetPosition, bottom, top, normal.
name - replace yor_ladder_name_here with name of your ladder.
top - to get values use pivot of ladder. (dont move mesh!) and place it on top on center of first step of ladder and copy your coords into ytyp for top
offsetPosition - use same coords as in top
bottom - now place pivot on bottom on center of last step of ladder
and copy your coords into ytyp for bottom
normal - this value defines wheres is front of ladder (from which side player will climb up)
so if your ladder is created parallel to grid then no prob - use 1 or -1 for x or y depends wheres is front of your ladder:
but if your ladder is rotated, not parallel to grid then you will need coords by setting pivot in one unit from ladder under 90 degrees
in overall best way is to create ladder parallel to grid.
And tip: if you have few ladders in one ydr use same method as above but for each ladder so in ytyp there will be one entry for ydr with multiple extensions CExtensionDefLadder - each extension for each ladder.
Heres update how quickly take coords for normal (defines wheres is front of ladder (from which side player will climb up))
In angled ladders parts of getting values for top, bottom and offset are same as above but for normal you need to create cylinder with these values:
Now place it at exact 0,0,0 (dont change pivot position of cylinder) and change it to editable mesh
Now got to vertex selection for cylinder and select one vertex which is in front of ladder
It dont need to be at exact 90 degrees due to ladder - but if its close to 90 then animation of climbing that ladder will be correctly but if difference will be bigger from 90 then animation of climbing will be incorrect - angled.
01/10/2020 - added tuto for angled ladders
13/05/2020 - created this page
© 2019-2021 All rights reserved by Dekurwinator.