Haravikk Posted January 6, 2019 Share Posted January 6, 2019 I'm curious whether it's possible to switch the player's control over to an actor other than the player character? My intention is to do something similar to the Dreamstride sequence in Waking Nightmare, where the player is temporarily acting out a "dream" as though they were a different person, however I'd like to be able to have them able to engage in combat using the other character's weapons and abilities, so it won't be enough for me to just force them into first person and disable weapons which is what I believe the Dreamstride sequence does, as I need the player to at least see the correct arms, but also have the correct weapons and stats so I can balance them against the enemies they'll face. So, is it possible to temporarily switch the player's control from the default player character reference to a different actor? If not, what are my options for workarounds (if any)? Ideally I need to at least to be able to pretend the player is someone else in a first person view, I'd prefer to be able to have combat support, but it isn't critical. Link to comment Share on other sites More sharing options...
SeraphimKensai Posted January 6, 2019 Share Posted January 6, 2019 It is possible, I've seen it done before and honestly I just started working on a scripted spell effect for it last night, so I should have something done for my 1.7 release later this month. That said, the dreamstride event you were technically in your own body fixed to first person, unable to attack, and given an imod to change the screen coloration for the effect. Link to comment Share on other sites More sharing options...
Haravikk Posted January 6, 2019 Author Share Posted January 6, 2019 (edited) It is possible, I've seen it done before and honestly I just started working on a scripted spell effect for it last night, so I should have something done for my 1.7 release later this month. Sounds promising! Are there any particular functions you're using to do this or are there a lot more moving parts required to make it work? I just found a mod that sounds like it may actually already do something similar, Alternate Actors, but really I'm hoping to just integrate a temporary switch into my mod without having to introduce any new dependencies. That said, the dreamstride event you were technically in your own body fixed to first person, unable to attack, and given an imod to change the screen coloration for the effect. Yeah I thought that might be the case, just like reading the Elder Scroll at the Throat of the World. Edited January 6, 2019 by Haravikk Link to comment Share on other sites More sharing options...
Evangela Posted January 6, 2019 Share Posted January 6, 2019 https://www.creationkit.com/index.php?title=SetPlayerControls_-_Actor ? Link to comment Share on other sites More sharing options...
SeraphimKensai Posted January 6, 2019 Share Posted January 6, 2019 Rasikko is right, that's definitely a function to use, otherwise the spell version I'm building will disable the player's controls of themselves during the effect as well and a few other more asthetic functions based on what I'm aiming to do via flavor. I'm guessing I might have my next update complete as well probably within about 2 weeks. Link to comment Share on other sites More sharing options...
Evangela Posted January 6, 2019 Share Posted January 6, 2019 (edited) Will need to use SetCameraTarget() to force the camera to switch to the controlled actor. And SetPlayerAIDriven() to shut down the player(otherwise you'll be moving both of them). Control is not total control. You can swing weapons, etc, but it seems you can't go through load doors, and the left hand is still controlled by the "player" lol. Head movement, etc is still AI controlled. Edited January 6, 2019 by Rasikko Link to comment Share on other sites More sharing options...
Haravikk Posted January 6, 2019 Author Share Posted January 6, 2019 Will need to use SetCameraTarget() to force the camera to switch to the controlled actor. And SetPlayerAIDriven() to shut down the player(otherwise you'll be moving both of them). Control is not total control. You can swing weapons, etc, but it seems you can't go through load doors, and the left hand is still controlled by the "player" lol. Head movement, etc is still AI controlled. Thanks for the info! Load doors shouldn't be an issue (the dream sequence should take place in a single area). The left hand issue is a bit weird; fortunately the player won't be visible in my case (I'll move them to a hidden part of the dream sequence area then make the switch), but does that mean that a puppet can't block or just that the player continues to use left-hand actions at the same time as the puppet does? Might be able to work around that by equipping a shield temporarily perhaps (to prevent spells being fired or such)? Since they're being set to AI controlled I wonder if there's an AI package that could render them unable to respond to your left hand attack somehow? Link to comment Share on other sites More sharing options...
Recommended Posts