Jump to content

Recommended Posts

Posted

Has anyone experience with adding AI packages to NPCs, in my case the player?

Does it work properly?

 

Basically I'd like to add and remove a package using a script without editing the NPC manually

Posted

Is this to perform a scene or something? You'd have to disable player controls I would think or it won't do anything even when the conditions are fulfilled.

iirc there's an ai control toggle as well, at least in Skyrim, I assume that would help

Posted

The console commands SetPlayerAIDriven and ToggleControlsDriven don't work as far as I know.

 

Moving the player as if they were controlled by an AI package would be possible with a dummy (invisible) furniture, a custom furniture animation and FurnitureRef.Activate(PlayerRef).

Posted

SetPlayerAIDriven does work as far as I remember as I've used it to control a cat instead of the player

Game.Getplayer().RemoveItem (CFCatFood, 1)
Game.ForceThirdPerson()
CatMinkaActor.SetPlayerControls(true)
CatMinkaActor.EnableAI(True, False)
Game.SetPlayerAIDriven(true)
Game.SetCameraTarget(CatMinkaActor)

KmyQuest.CatControl()

The real issue is that I propably can't add and remove a package to the playerref as there is no script for that

Posted

SetPlayerAIDriven does work as far as I remember as I've used it to control a cat instead of the player

Game.Getplayer().RemoveItem (CFCatFood, 1)
Game.ForceThirdPerson()
CatMinkaActor.SetPlayerControls(true)
CatMinkaActor.EnableAI(True, False)
Game.SetPlayerAIDriven(true)
Game.SetCameraTarget(CatMinkaActor)

KmyQuest.CatControl()

The real issue is that I propably can't add and remove a package to the playerref as there is no script for that

 

I take control of the player in a couple of my scenes as well - albeit only for a couple of seconds, because it's super janky. The way I apply AI packages to the player is in scenes. It's pretty much the same approach as with NPCs in scenes. That's probably not what you're looking for since you want to do it script based, but maybe you can make it work for you.

 

Posted

So far no luck. Using

Game.ForceThirdPerson()
Game.SetPlayerAIDriven(true)
utility.wait(0.1)
PSPlayerSandboxQ.start()
PSPlayerSandboxQScene.start()

in a magic effect

 

and having a scene where the player has a sandbox package applied only lets the player stand around immovable

  • Recently Browsing   0 members

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