Zorkaz Posted September 1, 2020 Posted September 1, 2020 Can someone lead me to the right tutorial about quest aliases if it exists? The setup: Basically I have a misc item called "Mining Explosives" (It can't be an explosive because you need at least 8 to get out of a Canyon) When I activate a holotape via Pipboy (Via Event OnItemEquipped())it should detonate those mines (Via placeatme(Explosion) and .Disable())Of course it checks if the main quest has been completed The issue: Well everything.I get that you need to make a alias that searches via "Find matching Reference", closest to player.And "HasKeyword" is important too. But how can I achieve the rest? I know it's a big and vague question.
SKKmods Posted September 1, 2020 Posted September 1, 2020 I would tend to model it in script as its more flexible before optimising with an alias fill. Unless it needs specific RefCollection alias fill conditions to detect. Which a bunch of known MISC objects the the loaded area do not:Actor Property pPlayerREF auto const mandatory MiscObject Property pMiscExplosives auto const mandatory Explosion Property pCGPrewarNuke auto const mandatory Function ExplosivesGoBoom() ObjectReference[] Explosives = pPlayerRef.FindAllReferencesOfType(pMiscExplosives, afRadius = 10240) If (Explosives.Length < 8) ;Too Few case ElseIf (Explosives.Length > 8) ;Too many case ElseIf (Explosives.Length == 8) ;goldilocks case Int iIndex =0 While (iIndex < Explosives.Length) Explosives[iIndex].PlaceAtMe(pCGPrewarNuke) Explosives[iIndex].Disable() Explosives[iIndex].Delete() iIndex +=1 Endwhile EndIf EndFunctionThe Quest alias way would be to create a ReferenceCollectionAlias, set Max count 0, set Optional, Fill conditions GetIsID == MiscExplosives (or whatever the Form name is). Then attach a script to the quest with;Explosion Property pCGPrewarNuke auto const mandatory RefCollectionAlias Property Alias_Explosives auto const mandatory Event OnQuestInit() If (Alias_Explosives.GetCount() < 8) ;Too Few case ElseIf (Alias_Explosives.GetCount() > 8) ;Too many case ElseIf (Alias_Explosives.GetCount() == 8) ;goldilocks case Int iIndex =0 While (iIndex < Alias_Explosives.GetCount()) Alias_Explosives.GetAt(iIndex).PlaceAtMe(pCGPrewarNuke) Alias_Explosives.GetAt(iIndex).Disable() Alias_Explosives.GetAt(iIndex).Delete() iIndex +=1 Endwhile EndIf (Self as Quest).Stop() EndEvent
Recommended Posts