Jebbalon Posted February 28, 2017 Share Posted February 28, 2017 How can I reset a single Quest Alias with Fill Type Create Ref at ? I have a quest that fills a bunch of aliases.They use the Fill Type - Create Ref at - the Actor is a Leveled NPC will be created at a Patrol marker.If the Actor dies I want to Clear that Alias and then Fill it again with new ref.This all works if I Stop the quest then Start again - everything is cleared and re-filled. (new actros spawn at patrol markers)But what I want is to have it re-fill aliases as needed not all at once.So, in a script on the Alias I can use the Event OnDeath() and then Clear() the Alias.But, how can I fill that alias again... ForceRefTo() and ForceRefIfEmpty() - Are they useable when the Alias has a Fill Type Create Ref At ??Is there a way to 'Reset' just the one Alias? having it fill again? Thanks-Jebbalon Link to comment Share on other sites More sharing options...
Lisselli Posted February 28, 2017 Share Posted February 28, 2017 (edited) Is there a way to 'Reset' just the one Alias? having it fill again? Thanks-JebbalonThere is, but unfortunately it's bugged. Calling Reset()(The version for references) on actors makes them reappear in very odd ways -.- You can reset a whole quest by calling Reset() on the quest property or just do it in stage fragment, and even in the alias itself OnDeath via GetOwningQuest().Reset() You can use ForceRefIfEmpty just in case for some reason the alias has not cleared and 'do something else' if it turns out to not be empty. Generally they are ok for all forms of Ref filling, so long as those refs are expected to be cleared before hand. Edited February 28, 2017 by Lisselli Link to comment Share on other sites More sharing options...
Jebbalon Posted February 28, 2017 Author Share Posted February 28, 2017 Calling Reset() on the actor will resurect them. I'm wanting to let them die and clear the alias to let a new actor fill in. Reset on the whole quest isn't what I want because I have many actors in lots of aliases. Reset all for just one dead either leaves everyone quest-less / package-less and generates all new actors making it very crowded. Instead I was thinking I could set a timer like every 24 hours, clear - disable - delete everyone then reset entire quest generating new actors. So, the question is will ForceRefIfEmpty(-LeveledNPC-) work if I just leave the -LeveledNPC- as None? Because the Alias itself will Create Ref At my patrol marker. Or should I just Force the same Leveled NPC list into the alias? Link to comment Share on other sites More sharing options...
Jebbalon Posted March 4, 2017 Author Share Posted March 4, 2017 So...... Periodic Reset of the entire quest is what I ended up doing.Set up a While loop to kill off any npcs still in aliases - reason for this is that if I reset without killing, they lose their alias then just wander around where they were at. Spawning new actors would get crowded quick. Also, I don't actually kill them. I used the TryToDisable() command then Delete() after that. Seems to work well.Then I Reset, Stop and Start the quest - which respawns everyone anew.Default is every 24 hours a Respawning Event will kick off - Again, it seems to be working. Anyone interested - I've been working on this for the Patrols Addon for OBIS SE - Check it out. Will be releasing update with the above respawning of patrols soon. Link to comment Share on other sites More sharing options...
Recommended Posts