Scriv07

Sample Script

May 10th, 2016
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. Scriptname SampleScript extends ReferenceAlias
  2. ; Comments
  3. ; https://www.reddit.com/r/FalloutMods/comments/4iqpvs/fo4_help_basic_script/
  4.  
  5. ; Reference
  6. ; http://www.creationkit.com/fallout4/index.php?title=ReferenceAlias_Script
  7. ; http://www.creationkit.com/fallout4/index.php?title=Debug_Script
  8. ; http://www.creationkit.com/fallout4/index.php?title=Actor_Script
  9.  
  10. Form Property ItemEquipped Auto
  11. Form Property ItemAdded Auto
  12.  
  13.  
  14. Event OnItemEquipped(Form akBaseObject, ObjectReference akReference)
  15. Actor player = Game.GetPlayer()
  16. If (self.GetActorReference() == player) ; player only
  17. If (akBaseObject == ItemEquipped)
  18. Debug.MessageBox("You just equipped the " + ItemEquipped + " item and will receive the " + ItemAdded + " item.")
  19. player.AddItem(ItemAdded, 1)
  20. EndIf
  21. EndIf
  22. EndEvent
Add Comment
Please, Sign In to add comment