Jump to content

Quest markers on generated NPCs


Recommended Posts

Posted

If I generate a few instances of EscapedSlave Actor on various places, how can I add them as quest markers on an ongoing quest 'CaptureEscapedSlaves'?

 

Say that after a random amount of times, a few new EscapedSlaves were released/generated at random locations?

 

Can this be achived if one restarts the quest? Can I script-wise in some simple way add these new 'EscapedSlave' as quest markers to 'CaptureEscapedSlaves'?

 

Assume I am looking for an easy solution that I can use.. :s

Posted

Thank you very much.

 

I create this new quest!

 

Give it an QuestAlias 'AllEscapedSlaves'

 

Add it to an Objective 'FindEscapedSlaves' as Quest Target Data.

 

Can you please give me an example of how to use ForceRefTo in this example, because that specific command is the dread of my scripting existance?

 

Say that I've created and personlised three EscapedSlaveActor; ESA1, ESA2, ESA3 through script?

 

 

You need to fill them into the Quest Aliases that the markers would point at using ForceRefTo: http://www.creationkit.com/ForceRefTo_-_ReferenceAlias

 

Posted

Well, I actually have no experience with spawning in things, but let's say that you're using a script to spawn them in. Then you can have a variable refer to them. For example, I don't know if this would work for your purposes but consider: Actor SpawnedActor = SpawnMarker.PlaceAtMe(ActorToSpawn).

 

So, then let's say your quest has 10 reference aliases that can be filled and that you have quest markers to each of them. Every time you spawn in a new actor like that, you then go...

; Blah blah blah your other properties
ReferenceAlias[] Property QuestRefAliases Auto ; Then you fill that array with your ref aliases from your quest. Let's say you have ten.

; your event that will spawn in an actor which could included...
Actor SpawnedActor = SpawnMarker.PlaceAtMe(ActorToSpawn)
if (QuestRefAliases[0].GetActorReference() = None)
QuestRefAliases[0].ForceRefTo(SpawnedActor)
elseif (QuestRefAliases[1].GetActorReference() = None)
QuestRefAliases[1].ForceRefTo(SpawnedActor)
...
elseif (QuestRefAliases[9].GetActorReference() = None)
QuestRefAliases[9].ForceRefTo(SpawnedActor)
endif

Of course, that's just the gist of how it would work (I have no idea if PlaceAtMe is the most applicable way to spawn them in). General idea is to somehow put the spawned actor into a variable and then slot them into an empty Ref Alias (of course, once you're through with them, clear the Ref Alias). Note that you can have a quest objective that has multiple quest markers, so just have them point at Ref Aliases even if they are empty (if they are, no marker will show up, but it will when it gets filled). However, I distinctly remember that, if you have arunning quest objective that points to an empty reference that you then fill, after the filling, the quest marker only gets updated once you go through a load screen. I can't remember if there is a way to update it at the time you fill the alias... And also notice that you shouldn't have more Actors spawned in at a time than you have references.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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