Cheers!
Set quest marker to object
Spoiler
Function SetQuestMarker(ObjectReference akTrap, HISAnimalTrapScript01 TrapScript) Int MyQuestID = 0 ObjectReference TrapAliasRef Bool BaitKnown if TrapScript.BaitKnownNameObjectRef != None; if the known bait dummy object has been placed TrapAliasRef = TrapScript.BaitKnownNameObjectRef BaitKnown = True else TrapAliasRef = TrapScript.MyActivator BaitKnown = False endif if !MyTrap01.GetReference() MyTrap01.ForceRefTo(TrapAliasRef) if BaitKnown == False SetObjectiveDisplayed(11) else SetObjectiveDisplayed(21) endif MyQuestID = 1 elseif !MyTrap02.GetReference() MyTrap02.ForceRefTo(TrapAliasRef) if BaitKnown == False SetObjectiveDisplayed(12) else SetObjectiveDisplayed(22) endif MyQuestID = 2 elseif !MyTrap03.GetReference() MyTrap03.ForceRefTo(TrapAliasRef) if BaitKnown == False SetObjectiveDisplayed(13) else SetObjectiveDisplayed(23) endif MyQuestID = 3 elseif !MyTrap04.GetReference() MyTrap04.ForceRefTo(TrapAliasRef) if BaitKnown == False SetObjectiveDisplayed(14) else SetObjectiveDisplayed(24) endif MyQuestID = 4 elseif !MyTrap05.GetReference() MyTrap05.ForceRefTo(TrapAliasRef) if BaitKnown == False SetObjectiveDisplayed(15) else SetObjectiveDisplayed(25) endif MyQuestID = 5 elseif !MyTrap06.GetReference() MyTrap06.ForceRefTo(TrapAliasRef) if BaitKnown == False SetObjectiveDisplayed(16) else SetObjectiveDisplayed(26) endif MyQuestID = 6 elseif !MyTrap07.GetReference() MyTrap07.ForceRefTo(TrapAliasRef) if BaitKnown == False SetObjectiveDisplayed(17) else SetObjectiveDisplayed(27) endif MyQuestID = 7 elseif !MyTrap08.GetReference() MyTrap08.ForceRefTo(TrapAliasRef) if BaitKnown == False SetObjectiveDisplayed(18) else SetObjectiveDisplayed(28) endif MyQuestID = 8 elseif !MyTrap09.GetReference() MyTrap09.ForceRefTo(TrapAliasRef) if BaitKnown == False SetObjectiveDisplayed(19) else SetObjectiveDisplayed(29) endif MyQuestID = 9 elseif !MyTrap10.GetReference() MyTrap10.ForceRefTo(TrapAliasRef) if BaitKnown == False SetObjectiveDisplayed(20) else SetObjectiveDisplayed(30) endif MyQuestID = 10 else; no trap aliases are free HISTrapNoMarkersFreeMessage.Show(); notification Return endif SetTrapQuestID(akTrap, MyQuestID)EndFunction
Remove the objects quest marker
Spoiler
Function RemoveQuestMarker(HISAnimalTrapScript01 TrapScript) Bool BaitKnown if TrapScript.BaitKnownNameObjectRef != None; if the known bait dummy object has been placed BaitKnown = True else BaitKnown = False endif Int MyQuestID = TrapScript.MyTrapQuestID if MyQuestID == 1 MyTrap01.Clear() SetObjectiveDisplayed(11, false) SetObjectiveDisplayed(21, false) TrapScript.MyTrapQuestID = 0 elseif MyQuestID == 2 MyTrap02.Clear() if BaitKnown == False SetObjectiveDisplayed(12, false) else SetObjectiveDisplayed(22, false) endif TrapScript.MyTrapQuestID = 0 elseif MyQuestID == 3 MyTrap03.Clear() if BaitKnown == False SetObjectiveDisplayed(13, false) else SetObjectiveDisplayed(23, false) endif TrapScript.MyTrapQuestID = 0 elseif MyQuestID == 4 MyTrap04.Clear() if BaitKnown == False SetObjectiveDisplayed(14, false) else SetObjectiveDisplayed(24, false) endif TrapScript.MyTrapQuestID = 0 elseif MyQuestID == 5 MyTrap05.Clear() if BaitKnown == False SetObjectiveDisplayed(15, false) else SetObjectiveDisplayed(25, false) endif TrapScript.MyTrapQuestID = 0 elseif MyQuestID == 6 MyTrap06.Clear() if BaitKnown == False SetObjectiveDisplayed(16, false) else SetObjectiveDisplayed(26, false) endif TrapScript.MyTrapQuestID = 0 elseif MyQuestID == 7 MyTrap07.Clear() if BaitKnown == False SetObjectiveDisplayed(17, false) else SetObjectiveDisplayed(27, false) endif TrapScript.MyTrapQuestID = 0 elseif MyQuestID == 8 MyTrap08.Clear() if BaitKnown == False SetObjectiveDisplayed(18, false) else SetObjectiveDisplayed(28, false) endif TrapScript.MyTrapQuestID = 0 elseif MyQuestID == 9 MyTrap09.Clear() if BaitKnown == False SetObjectiveDisplayed(19, false) else SetObjectiveDisplayed(29, false) endif TrapScript.MyTrapQuestID = 0 elseif MyQuestID == 10 MyTrap10.Clear() if BaitKnown == False SetObjectiveDisplayed(20, false) else SetObjectiveDisplayed(30, false) endif TrapScript.MyTrapQuestID = 0 else; no trap quests ID found Return endif ReturnEndFunction