Scriv07

Sample Script

May 10th, 2016
127
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.  
  3. ; Comments
  4. ; https://www.reddit.com/r/FalloutMods/comments/4iqpvs/fo4_help_basic_script/
  5.  
  6. ; Reference
  7. ; http://www.creationkit.com/fallout4/index.php?title=ReferenceAlias_Script
  8. ; http://www.creationkit.com/fallout4/index.php?title=Debug_Script
  9. ; http://www.creationkit.com/fallout4/index.php?title=Actor_Script
  10.  
  11. Form Property ItemEquipped Auto
  12. Form Property ItemAdded Auto
  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