Difference between revisions of "Complete Example Scripts"
Jump to navigation
Jump to search
m
→Making a Cool Cut-Scene: Float parameters cast as floats (unnecessary auto-casting)
imported>JustinOther m (→Move an Object to a Specific Location Without Fade: 500 Δ 500.0 given afSpeed is a float (unnecessary auto-cast)) |
imported>JustinOther m (→Making a Cool Cut-Scene: Float parameters cast as floats (unnecessary auto-casting)) |
||
Line 556: | Line 556: | ||
Event OnTriggerEnter(ObjectReference akActionRef) | Event OnTriggerEnter(ObjectReference akActionRef) | ||
If akActionRef == PlayerREF ; Limit this trigger to the player only. | If akActionRef == PlayerREF ; Limit this trigger to the player only. | ||
PlayerREF.SetAlpha(0) | PlayerREF.SetAlpha(0.0) | ||
PlayerREF.SetGhost(True) | PlayerREF.SetGhost(True) | ||
Game.DisablePlayerControls(True, True, True, False, True, False, True) ; Disable all controls except looking. | Game.DisablePlayerControls(True, True, True, False, True, False, True) ; Disable all controls except looking. | ||
Utility.Wait(0.1) ; Give the script time... | Utility.Wait(0.1) ; Give the script time... | ||
PlayerREF.TranslateToRef(Point1, 100) | PlayerREF.TranslateToRef(Point1, 100.0) | ||
Utility.Wait(5.0) ; After 5 seconds, proceed to next point. | Utility.Wait(5.0) ; After 5 seconds, proceed to next point. | ||
PlayerREF.TranslateToRef(Point2, 50) | PlayerREF.TranslateToRef(Point2, 50.0) | ||
Utility.Wait(10.0) ; After 10 seconds, go to next area | Utility.Wait(10.0) ; After 10 seconds, go to next area | ||
PlayerREF.TranslateToRef(Point3, 200) | PlayerREF.TranslateToRef(Point3, 200.0) | ||
Utility.Wait(20.0) ; Watch the final scene, and then... | Utility.Wait(20.0) ; Watch the final scene, and then... | ||
PlayerREF.SetAlpha(1) | PlayerREF.SetAlpha(1.0) | ||
PlayerREF.SetGhost(False) | PlayerREF.SetGhost(False) | ||
Game.EnablePlayerControls() | Game.EnablePlayerControls() |