Hey there - I am working on the "Lock/Unlock Player Movement" function and trying to determine the best way to implement it while taking future possibilities into consideration. I am thinking the one-way path stuff would be its own thing for limiting specific directions, so would the lock function be flexible enough if I had these 3 parameters that could be specified to be locked or unlocked?
- Walking: If locked, player can't move/strafe from the tile they are on
- Turning: If locked, player can't turn left or right (only applicable to first-person)
- Interaction: If locked, player can't interact with objects or characters at adjacent tiles
Whether this works probably depends on what some of the specific scenarios are that you have planned. I want to plan ahead when creating these functions, but then again I don't want to make a particular function too complex since I can always add additional functions if something more specific is needed. Let me know what you think! It's a difficult decision because I could make a function as specific as "lock player from turning left" all the way to a very generic "lock player from any sort of movement or interaction".
Actually, I guess either way I can always add more functions, so for now it's probably up to what scenarios you will need to handle. :)