Hello everyone, this is the first time that I have started using unity and I am working on a class project with it. Its an RPG where magic is primarily used and one of the spells we are creating is call Soul Transfer. in essence what it does is allows the player to take control of the enemy player and control it as if it where the player, I have read/watched tutorials but I cannot seem to find how I can create a script that will allow me to change the elements of an enemy object to that of a player object. Any help would be most appreciated, thank you in advance
Disable the AiController script and enable a PlayerController script?
it all depends on the setup, but more or less what Grozzler said, disable the AI on it, and inplace enable a player controller that uses the methods and movemeant of the AI charcter.
In cases like this it helps to have clear sepration of what a object can do, and how the object is being controlled. I tend to seprate my AI and charcters into a pawn which is a script that has methods for things like moveing, jumping, attacking etc. than the controller script which tells the pawn what to do. the controller script could be AI or it could be a wrapper around the players inputs.