Surjamte Posted September 12, 2015 Share Posted September 12, 2015 Hey, I am trying to do this: 1. Player presses a button/activates and activator2. The control switches to an npc. (That can be controlled and moved just like you would normally move your character). To do this am trying to use this function: SetPlayerControls(true) I tried this script for example: Scriptname SGENSwitchPlayerControlScript extends Actor Actor Property ControlTarget Auto Event OnActivate(ObjectReference akActionRef)ControlTarget.SetPlayerControls(true)endevent But nothing happened. Anyone know how to make something like this work? Link to comment Share on other sites More sharing options...
KunoMochi Posted September 12, 2015 Share Posted September 12, 2015 Is the script being used by the button? If so, try extending the script from an ObjectReference instead, like so: Scriptname SGENSwitchPlayerControlScript extends ObjectReference {Button activates control of NPC} Actor Property ControlTarget Auto Event OnActivate(ObjectReference akActionRef) ControlTarget.SetPlayerControls(true) endevent You may also want to disable movement controls on the Player actor themselves since you may end up moving both the Player actor and the NPC at the same time (unless that is intended). Link to comment Share on other sites More sharing options...
Recommended Posts