- Home /
Change player control to a target model (FPS)
I am developing a small prototype in which the player controls a small mind controlling alien. The player needs to be able to take control of a target human, switching all camera and controls to the human in question.
I have two ideas on how to progress, which one is more feasible? (I'm happy to listen to alternative ideas)
Each human in the level has a deactivated FPS controller script (and accompanying scripts). These scripts are activated when controlled (disabling the alien's scripts for the duration).
Detach the current scripts from the alien and attach them to the target human.
The pros and cons as far as I seem them:
Can have separate alien/human controls scripts (i.e. don't need to use States for input - e.g. can fire a gun whilst human, instead of melee as an alien on LMB). This method is very clusterfucky.
This method is clean, but the code file for the player will be much larger as I cannot separate the input code as easily.