CPE: Function: Auto-reset Zipline





This is an updated zipline – in the previous version, the handle will stay at the top when the player drop from the upper layer, and this caused the player unable to use the zipline from the lower floor once again when the XR rig reset to start point. Now it can automatically go back to pick the player again!

Before:

Updated:

Logic:

By adding extra script inspired by moving platform (which has at least 2 destination pivots pointing each other and asking the platform to move towards the other point once it reached an end), the handle is now able to move automatically when it’s not touched. I adapted the script from asking the handle to move between the 2 destinations to always only moving to one end (the starting point)

Script on the handle:

(on start) This is set to move to the endpoint (Cylinder (1)) – so when it reaches the endpoint it will 100% be sent to the start point. This is to make sure even if the player loses their hand halfway the handle is still able to run the full journey and go back on its own.

Script on the start point:

This is set to always ask the handle to move to itself – and this is what differs from the moving platform. When setting up a moving platform, the start point should always point somewhere else rather than itself thus the platform can continuously move. But in this case, we don’t want our handle to go anywhere else, so just staying with the starting point is fine.

Script on the end point:

This is the same setting as a moving platform and it asked the handle to go back to starting point once it reaches this point.

I’m glad this moving script is not conflicting with the player control of the handle….

Liked Liked
No Comments