Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Scriptname ScavverTravelPkgTracker extends Package
- { It just works. }
- ; SCAVVER MOD BY @THORALDGM | [email protected] | SCRIPT UPDATED 20160619
- ; -----------------------------------------------------------------------------
- ; PROPERTIES
- ; -----------------------------------------------------------------------------
- GlobalVariable Property pgvScavverCurrentRoute Auto Mandatory ; What is the current route? (default = 100)
- GlobalVariable Property pgvScavverCurrentMarker Auto Mandatory ; Track route progress / location (0 to 27)
- GlobalVariable Property pgvScavverIsRelocating Auto Mandatory ; Is Scavver in process of relocating?
- GlobalVariable Property pgvScavverRelocated Auto Mandatory ; Did Scavver finish relocating?
- GlobalVariable Property pgvScavverLootedArea Auto Mandatory ; Condition for package stack. Important!
- GlobalVariable Property pgvScavverStatusSniffer Auto Mandatory ; Does player have Scavver dev tracking on?
- ObjectReference Property pScavMarker000 Auto Const Mandatory ; Scavver's moving target for travel location
- ObjectReference Property pScavMarker100 Auto Const Mandatory ; Vault 111 Ext
- ObjectReference Property pScavMarker101 Auto Const Mandatory ; Sanctuary mailbox
- ObjectReference Property pScavMarker102 Auto Const Mandatory ; Minuteman statue
- ObjectReference[] Property arScavMarkers Auto ; Array of ScavMarkers (0 = 100, 1 = 101 ...)
- ; -----------------------------------------------------------------------------
- ; EVENT: ON START ("Called when the package starts.")
- ; -----------------------------------------------------------------------------
- Event OnStart(Actor akActor)
- string DevMsg = ""
- int CurrentMarker = pgvScavverCurrentMarker.GetValue() as int
- int NextMarker
- If pgvScavverIsRelocating.GetValue() == 1
- DevMsg = "SCAVVER TRAVEL PACKAGE RESTARTED."
- Else
- DevMsg = "Scavver travel package started."
- NextMarker = CurrentMarker + 1
- pScavMarker000.MoveTo(arScavMarkers[NextMarker])
- pgvScavverCurrentMarker.SetValue(NextMarker as float)
- EndIf
- If pgvScavverStatusSniffer.GetValue() == 1
- Debug.Notification(DevMsg)
- EndIf
- pgvScavverIsRelocating.SetValue(1)
- EndEvent
- ; -----------------------------------------------------------------------------
- ; EVENT: ON CHANGE ("Called when the package is preempted or ends normally.")
- ; -----------------------------------------------------------------------------
- Event OnChange(Actor akActor)
- If pgvScavverRelocated.GetValue() == 1 ; Travel package ended normally
- ; so do nothing
- Else ; Otherwise
- If pgvScavverStatusSniffer.GetValue() == 1 ; if player is dev tracking
- Debug.Notification("SCAVVER TRAVEL PACKAGE INTERRUPTED.") ; then let player know package interrupted
- EndIf
- EndIf
- akActor.EvaluatePackage() ; Force Scavver to choose a package
- EndEvent
- ; -----------------------------------------------------------------------------
- ; EVENT: ON END ("Called when package ends normally, not called if preempted.")
- ; -----------------------------------------------------------------------------
- Event OnEnd(Actor akActor)
- pgvScavverIsRelocating.SetValue(0) ; Scavver is no longer relocating
- pgvScavverRelocated.SetValue(1) ; Scavver finished relocating
- pgvScavverLootedArea.SetValue(0) ; Reset condition for package stack!
- If pgvScavverStatusSniffer.GetValue() == 1 ; If player is dev tracking
- Debug.Notification("Scavver travel package ended.") ; notify that package ended well
- EndIf
- EndEvent
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement