Complete Example Scripts: Difference between revisions

Jump to navigation Jump to search
no edit summary
imported>MoopusMaximus
imported>Scrivener07
No edit summary
Line 762: Line 762:
EndEvent
EndEvent
</Source>
</Source>


===Making a Cool Cut-Scene===
===Making a Cool Cut-Scene===
Line 794: Line 796:


'''How to use this script''': Make a new trigger box, and then add this script to it. Make 3 XMarkers, and define them in the Properties Window. Enter your new trigger, and see your cool cut-scene!
'''How to use this script''': Make a new trigger box, and then add this script to it. Make 3 XMarkers, and define them in the Properties Window. Enter your new trigger, and see your cool cut-scene!
=== Script a container that only accepts certain items by [[User:Scrivener07|Scrivener07]] 24 April 2012 ===
'''How to use this script''': Change the ITEM property to whatever you want and the container will only accepts those items. If you want a container that only accepts an item that isnt a MiscObject just change the property type to the correct type.
<Source lang="Papyrus">
Scriptname ExampleContainerScript extends ObjectReference 
Event OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer)
akSourceContainer = Game.GetPlayer()
If akBaseItem !=  ITEM
Self.RemoveItem(akBaseItem, aiItemCount, True)
Game.GetPlayer().Additem(akBaseItem, aiItemCount, True)
Debug.Notification("Invaild Item")
EndIf
EndEvent
MiscObject Property ITEM  Auto 
</Source>
Anonymous user

Navigation menu