Complete Example Scripts: Difference between revisions
Jump to navigation
Jump to search
no edit summary
imported>MoopusMaximus No edit summary |
imported>MoopusMaximus No edit summary |
||
| Line 762: | Line 762: | ||
EndEvent | EndEvent | ||
</Source> | </Source> | ||
===Making a Cool Cut-Scene=== | |||
<Source lang="Papyrus"> | |||
Scriptname Cutscene Extends ObjectReference | |||
ObjectReference Property Point1 Auto | |||
ObjectReference Property Point2 Auto | |||
ObjectReference Property Point3 Auto | |||
Event OnTriggerEnter(ObjectReference akActionRef) | |||
If akActionRef == Game.GetPlayer() ; Limit this trigger to the player only. | |||
Game.GetPlayer().SetAlpha(0) | |||
Game.GetPlayer().SetGhost(True) | |||
Game.DisablePlayerControls(true, true, true, false, true, false, true) ;Disables all controls except looking. | |||
Utilty.Wait(0.1) ;Give the script time... | |||
Game.GetPlayer().TranslateToRef(Point1, 100) | |||
Utility.Wait(5.0) ;After 5 seconds, proceed to next point. | |||
Game.GetPlayer().TranslateToRef(Point2, 50) | |||
Utility.Wait(10.0) ; After 10 seconds, go to next area | |||
Game.GetPlayer().TranslateToRef(Point3, 200) | |||
Utility.Wait(20.0) ;Watch the final scene, and then... | |||
Game.GetPlayer().SetAlpha(1) | |||
Game.GetPlayer().SetGhost(False) | |||
Game.EnablePlayerControls() | |||
Endif | |||
EndEvent | |||
</Source> | |||
'''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 | |||