Advertisement
ThoraldGM

Radstorm Event

Jun 26th, 2016
396
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.40 KB | None | 0 0
  1. Armor Property pRoadGoggles Auto Const Mandatory ; Radstorm goggles
  2. Armor Property pSurgicalMask Auto Const Mandatory ; Radstorm mask
  3. Weather Property pRadstorm Auto Const Mandatory ; Radstorm weather
  4.  
  5. Event OnInit()
  6. RegisterForRadiationDamageEvent(Game.GetPlayer()) ; Enables OnRadiationDamage event
  7. EndEvent
  8.  
  9. Event OnRadiationDamage(ObjectReference akTarget, bool abIngested)
  10. If (!abIngested && !(pScavverActor.IsEquipped(pSurgicalMask))) ; Eating food does not trigger this!
  11. String RadSource = "radiation"
  12. pScavverActor.EquipItem(pRoadGoggles, true, true)
  13. pScavverActor.EquipItem(pSurgicalMask, true, true)
  14. CancelTimer(2)
  15. Utility.Wait(1)
  16.  
  17. If Weather.GetCurrentWeather() == pRadstorm
  18. StartTimer(240, 2) ; Rad storm is ~4 real minutes
  19. RadSource = "radstorm"
  20. ; Debug.MessageBox("RAD STORM TIMER STARTED")
  21. Else
  22. StartTimer(30, 2) ; Check if roaches/barrels gone in 30 seconds
  23. RadSource = "rad objects"
  24. ; Debug.MessageBox("RAD EXPOSURE TIMER STARTED")
  25. EndIf
  26.  
  27. If pgvScavverStatusSniffer.GetValue() == 1
  28. Debug.Notification("Scavver put on " + RadSource + " gear.")
  29. EndIf
  30. Else
  31. RegisterForRadiationDamageEvent(Game.GetPlayer()) ; Catch the next radiation event
  32. EndIf
  33. EndEvent
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement