Emera Nova wrote:How do I make it so it can be used to climb down or up? Trying to make it so in a few area's the team is able to get down with out you know breaking all their legs.
Very simple. The code would probably look like this:
1. Make sure the party isn't moving or falling, and fail if so.
2. Make sure the target square has a floor or platform at a different elevation than the party's floor or platform, and fail if not.
3. If the target square has multiple platforms that could be climbed to, give the player some way to choose between them. Alternatively, you could enforce that the player has to climb along a wall when climbing upwards, which would make multiple targets impossible.
4. Make sure the party would be able to fall from the higher square to the lower square, i.e. make sure there are no enabled DynamicObstacleComponents, ExitComponents, ForceFieldComponents, MonsterComponents, ObstacleComponents, PlatformComponents, PitComponents, StairsComponents, or TeleporterComponents that are triggered by party* on the lower square at the higher square's elevation, and no enabled LadderComponents*, PortalComponents* or closed DoorComponents* that are on one of the squares, at the higher square's elevation, and facing the other square. Additionally, make sure that there are no enabled PlatformComponents or open PitComponents on the lower square at any elevation between the lower elevation and the higher elevation.
I marked some components with * because there are two different ways you might want to handle climbing up. One is to simply set the party's position to the higher square at the higher elevation, similar to how climbing down a pit works. The other, which is a bit more elegant, is to create LadderComponents for the party to climb up. If you do the second one, you would presumably
not want to fail for TeleporterComponents, LadderComponents, PortalComponents, or DoorComponents when climbing up. Since this method is not possible with climbing down, you would still want to check for those when climbing down.