Jump to content

How to run animation from one mod in a script?


Recommended Posts

This seems like it should be easy. I have a mod that adds a bunch of poses

 

to call a pose in game you do playidle a-acr10 for example

 

How would I call that in my script?

 

what would I need to be able to run

game.getplayer().playidle(a-acr10)?

 

how do the hkx files get connected to the script files?

Link to comment
Share on other sites

 

 

Here is what I have:

 

I've linked the property

 

Actor npc = CommandReciever

game.getplayer().PlayIdle(m37)
npc.PlayIdle(m37)
I can run from console playidle(m37)
but my script is not working...
Edited by coreyd86
Link to comment
Share on other sites

You probably have to overwrite/separate your default idle pose thru animation Subgraphs (https://www.creationkit.com/fallout4/index.php?title=Subgraphs) with a different animation keywords for each of your idle poses.

Use script to add the different keyword to your player/npc (actor.addkeyword) and then reload the animation subgraphs (AttemptAnimationSetSwitch()) . There is a catch. For player, after reload the animation subgraph, you need to enter/exit pipboy or fast travel for the new animation to take effect ...

 

Another way you can probably add all the animations as idle animations thru CK -> Gameplay -> Animations , under LOOSE. You can call these animations thru script. This works for NPC. It should work for player character too.

Link to comment
Share on other sites

  On 7/30/2018 at 12:12 AM, langnao said:

You probably have to overwrite/separate your default idle pose thru animation Subgraphs (https://www.creationkit.com/fallout4/index.php?title=Subgraphs) with a different animation keywords for each of your idle poses.

Use script to add the different keyword to your player/npc (actor.addkeyword) and then reload the animation subgraphs (AttemptAnimationSetSwitch()) . There is a catch. For player, after reload the animation subgraph, you need to enter/exit pipboy or fast travel for the new animation to take effect ...

 

Another way you can probably add all the animations as idle animations thru CK -> Gameplay -> Animations , under LOOSE. You can call these animations thru script. This works for NPC. It should work for player character too.

 

Yeah I went with the second option. I am just calling it by it's form id. Some of this can be a little frustrating as I'm never sure if I'm doing stuff inefficently... well once I post my mod hopefully people will like it enough to rip it to shreds lol. Thanks for the info!

Link to comment
Share on other sites

  • Recently Browsing   0 members

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