Jump to content

Creation Kit problem - Move player in scene with disabled controls


donotbugme

Recommended Posts

(No idea where to post question or request for help, if you can let me know before deleting post I can remake it over there - Thanks)
 
I have a simple scene I am doing, I've hit what I should think is a very basic problem but I cannot figure it out even googling around.
 
I have aliases for my NPCs working fine for a scene but Im having trouble getting my Player to move with disabled controls - I want them to automatically move to an xmarker
 
I have an Alias for the player character PlayerAlias setup to be
Specific Reference - Cell: any Ref: (PlayerRef('Player') Which should work (I think)
 
I have an alias for the floor marker my player is moving to the xmarker via a travel package in the scene, NPC moves to similar alias correctly so I think this is setup fine.
 
My navmesh works
 
 
Here is the order of events leading up to the scene starting where the player character is not being automatically moved to the marker
 

//Had to excise code because it was giving me that link or attachment new user error (2 posts required)

AliasJanna
Walk To XMarker   | Stand at XMarker -------------------------------------> | (Timer Scene Action with papyrus Fragment)
Dialog            |

_____________________________________________________


PlayerAlias         
WalkToXMarker | Stand at XMarker -------------------------------------> |
What is a correct/working way to disable player controls and then to move the player character?
 
EDIT: Tidied
Link to comment

At the very begin of the scene add this line of code: Game.SetPlayerAIDriven(True)
At the very end do: Game.SetPlayerAIDriven(False)

The best place where to put this is the main Scene script (just open the scene, and click on Edit Data, place the two lines one in the begin and one to the end.)

Link to comment

These are the funcitons I have set up and use in my scenes:

 

Function EnablePlayerControl()

game.setplayeraidriven(false)
Game.EnablePlayerControls()
libs.SetAnimating(libs.PlayerRef, false)
EndFunction
 
Function DisablePlayerControl()
game.disablePlayerControls()
game.forcethirdperson()
game.setplayeraidriven(true)
EndFunction

 

I suggest disabling the player controls before starting the scene.

 

 

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use