A question on switching player characters
Talon
20 Feb 2016, 11:57I've been using the default player for my game set up this far but was thinking it might be fun to use the change in POV, I"m curious if this would work/possible
I Was thinking it could be interesting should the player suffer an ignominious defeat and join the host of angels for another NPC to become playable.. I know you can change POV perspective but could i essentially rename the NPC to player on the fly to save all the coding that looks for the player object?
In effect From a logical perspective it would be this. Turn Current player into a a pile of bones, transform the NPC perspective's Name/attributes into the player(Thus preserving all the code that would normally affect the initial player.)..While I think it sounds logical I could do this there might be a few moments in the game with no "player" Object at all
I Was thinking it could be interesting should the player suffer an ignominious defeat and join the host of angels for another NPC to become playable.. I know you can change POV perspective but could i essentially rename the NPC to player on the fly to save all the coding that looks for the player object?
In effect From a logical perspective it would be this. Turn Current player into a a pile of bones, transform the NPC perspective's Name/attributes into the player(Thus preserving all the code that would normally affect the initial player.)..While I think it sounds logical I could do this there might be a few moments in the game with no "player" Object at all

XanMag
20 Feb 2016, 14:40I'm not sure you could do it the way you're thinking. Code must have all objects named differently.
It might be possible to have your current player renamed with an alias however. Then you could easily change the players appearance. But... I'm no coder, so you'll have to wait for the proper solution from those that know better!
It might be possible to have your current player renamed with an alias however. Then you could easily change the players appearance. But... I'm no coder, so you'll have to wait for the proper solution from those that know better!
Talon
20 Feb 2016, 15:37I am certainly leaning to believing you, I made a quickly test game and came to a full stop when I got the error that objects could not be renamed except in edit mode.. So it just might be something I'd have had to plan from the very start by using a "Game.Pov" rather than just the player.

jaynabonne
20 Feb 2016, 15:54There is a built in function to change the pov, named (believe it or not) "ChangePOV". Just invoke it with:
and that object will now be the POV. Just be sure that, in any custom scripts you may write, that you use "game.pov" instead of "player" if you wish to access things on the current pov.
And the POV defaults to "player" at startup unless you specify otherwise in your game config.
ChangePOV(newPOVobject)
and that object will now be the POV. Just be sure that, in any custom scripts you may write, that you use "game.pov" instead of "player" if you wish to access things on the current pov.
And the POV defaults to "player" at startup unless you specify otherwise in your game config.