Hope you all are having happy holidays. I need help nailing down exactly how to write this script.
I have a trigger, and I need to make it so that when the player enters the trigger at a certain stage, an actor is spawned at a certain point, and that actor is forced to become an alias in the quest.
I understand the basics, the event I need to use, how to set up conditions to check the quest stage all of that, I just need help getting the exact line. I know in Fallout you could use PlaceAtMe to spawn something, while simultaneously making that reference a variable in the script. I need to do the same thing, but make the PlaceAtMe'd actor also become forced into an alias slot.
Another thing that may matter, the player can potentially repeat this action if they fail the first time (Kill the actor), meaning this actor may already exist somewhere in the world as the alias. So I need the new one to become the alias, and the old one to simply be removed from the alias. I assume these two actions are inclusive, so I'm good to go, but I thought I'd mention that there could be 'duplicates', if you will. (Alternatively could I force the actor to 'leave' the alias when he dies, is there a line for that?)
This is what I'm thinking I would do, but I'm foggy on the details or if this is exactly how to go about doing it and if it would work:
MyQuestAlias.ForceRefTo((ActorSpawnRef.PlaceAtMe(NewActor, 1)))
Would that spawn 1 'NewActor' at 'ActorSpawnRef' whilst simultaneously forcing that new actor into the alias? (Allowing me to use alias applied packages, scenes, and objective markers, etc)
Thanks for any help!
AJV