Problem with Hackable Device


Author: Ethan Ortega

Problem:  While working with splines, I concluded it could be cool to allow our character to interact and hack something that is moving along a spline. When the player hacks something, they lose control of their movement and are in an immobile state until the hack is complete. The issue was, when the function to end the hack was called, the player would not resume control of their mobility. Debugging showed the function call was being hit but the player's movement was not reset back. On other hackable devices, the player was able to resume control but with the hackable on the spline, the player was rendered immobile. 

Solution: Through more debugging, I figured the function was being called too fast. After the item device was hacked, I wanted the player to immediately regain control, but that was the issue.  By using the Set Timer by Function Name, the problem was fixed. Giving the function even a 0.001-second delay solved the problem than not having a delay at all. The device on the spline stopped when hacked, and immediately after the player gained movement control back. Below is an image of the utilization of the time function which solved the problem of the completed hack being called too quickly.

Set Timer by Function Name


Leave a comment

Log in with itch.io to leave a comment.