Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Scriptname RadioStation_Main extends Quest
- ; CreationKit Papyrus Fallout4 script by skk50@nexusmods.com July 2017
- ; Radio station random track selection and RDS track display using debug messages (so PC only).
- ;
- ; Replace RadioStation with your unique mod name or id
- ; Create Global variable RadioStation_Track set default value to 1
- ; Add this script to your RadioStation quest under Scripts / New, set properties for RadioStation_Track
- ; On each Quest phase start tab conditions add GlobalVariable RadioStation_Track == phase number
- ; On each Quest phase start tab fragment set kmyQuest dropdopwn and paste kmyQuest.PhaseDisplay(phase number)
- GlobalVariable Property pRadioStation_Track Auto Const Mandatory ; create this global variable set default value to 1
- ;******************************************************
- Function PhaseDisplay(int iPhaseNumber)
- Int iNextTrack = iPhaseNumber
- While (iNextTrack == iPhaseNumber)
- iNextTrack = Utility.RandomInt(2,4) ; your number of phase tracks, but don't pick the first scene loop init phase
- EndWhile
- pRadioStation_Track.SetValue(iNextTrack)
- If Game.IsPlayerRadioOn() && Game.GetPlayerRadioFrequency() == 99 ; Validate player radio is on and tuned to RadioStation frequency
- If iPhaseNumber == 1
- Debug.Notification("RadioStation playlist")
- ElseIf iPhaseNumber == 2
- Debug.Notification("Phase 2 track display name")
- ElseIf iPhaseNumber == 3
- Debug.Notification("Phase 3 track display name")
- ElseIf iPhaseNumber == 4
- Debug.Notification("Phase 4 track display name")
- Endif
- Else
- Utility.Wait(5) ; stop constant loop when station is not selected, but avoid a long silence when first switched on
- Endif
- EndFunction
Add Comment
Please, Sign In to add comment