Jump to content

Location ref type and papyrus


Genamine

Recommended Posts

I know its possible in Fallout 4, but is there any way to add a location ref type to an actor reference spawned by script?

 

Specifically, in Fallout 4 it would be done as follows:

Actor akActorRef = akMarkerRef.PlaceAtme(ActorBase akActor) as Actor
akActorRef.SetLocRefType(Location akLocation, LocationRefType akLocRefType)

However, in Skyrim, the papyrus function akActorRef.SetLocRefType(Location akLocation, LocationRefType akLocRefType) isnt a thing

 

I was wondering if anyone knows of another way of achieving the same thing?

Link to comment
Share on other sites

Just thought Id pop back in and say I have achieved my goal

 

It was actually easier than I had anticipated

 

For posterity, heres what I did:

I added the script that spawns the actors to the quest that I wanted to use them as alias in as papyrus property

Upon spawning the actors, I added their references to an array in the script that spawns them

When the appropriate stage is set in the quest that uses the spawned actors as alias, it draws from the array in the script that spawned the actors to fill the aliases

 

There was never any need to use location ref types in the first place

 

If anyone finds themselves here looking for answers, send me a PM, dont post in this thread as I wont be reading it

Link to comment
Share on other sites

Sounds good as long as your array never gets the max of 128 entities. If it does papyrus will freak and unknown things will happen. I tested it once but I forget what actually happened when I did. I think the script just aborted with a stack dump papyrus log error.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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