Jump to content

Script Version of ForceRefIntoAlias?


senterpat

Recommended Posts

Just trying to force an object reference into an alias with a script, works just fine with console, so either ForceRefTo() isn't the command I need, it seems it may be ordering a reference to use the target, but documentation is hard to find, and I can't seem to find a proper command, though I'm sure it must exist. Or my script is incorrect. The rest of the function works fine in game, the problem line is:

            ActiveFollowers.ForceRefTo(akTargetRef)

Link to comment
Share on other sites

ActiveFollowers seems to be a Reference Collection Alias and not a Reference Alias.

For RefColls, you don't force the ref into the alias because it can hold more refs (and ForceRefTo is a RefAlias script function which won't work on RefColls), you add it to the collection like ActiveFollowers.AddRef(akTargetRef).

Link to comment
Share on other sites

Awesome that worked perfectly! I figured I was just missing out on the proper command

 

edit: Now I'm having a new issue that maybe you can help with. When trying to get the base form of a spawned creature, it is only returning the biome leveled creature when using GetActorBase() and an object reference when using GetLeveledActorBase(), but I need to obtain the base form ie PCM_Al-Battani_Al-Battani-II_Critter01. Again I'm sure there's a command I need to use, but I've opened all the scripts in Notepad++ and searched biome, actor, base, and form, and can't seem to find what I need. If that is the command I need I'll clean up and post my script in the hopes someone can help me out it

edit edit: NVM! I found the function I neeeded: GetMatchingPlanetActorBase(), did exactly what I needed, thanks again for your help 😄

Link to comment
Share on other sites

  • Recently Browsing   0 members

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