Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Game.GetPlayer().SetGhost() ; IMPORTANT: Player immune to all damage!
- If HH_DevTracking.GetValue() as Int == 1 ; If player wants dev messages
- If Game.GetPlayer().IsGhost() ; If player is a ghost,
- Debug.Notification("Hitchhiker: Player is a ghost!") ; display message
- EndIf
- EndIf
- If HH_OptionTeleportSound.GetValue() as Int == 1 ; If player wants teleport sound,
- Int iInstanceID = OBJHijackerTeleportOut2DA.Play(Game.GetPlayer()) ; play teleport sound at player
- EndIf
- DestinationMarker = Game.GetPlayer().PlaceAtMe(pXMarker) ; Dynamically spawn xmarker at player
- DestinationMarker.MoveTo(StaticRef, 250, 250, 500) ; Move marker to static ref with XYZ offsets
- DestinationMarker.MoveToNearestNavmeshLocation() ; Then move marker to nearest navmesh
- Game.GetPlayer().MoveTo(DestinationMarker) ; Move player to destination marker
- If HH_OptionSpinCamera.GetValue() as Int == 1 ; If player wants spincam after teleport
- Bool FirstView = Game.GetPlayer().GetAnimationVariableBool("IsFirstPerson") ; Is player in first person view?
- If FirstView ; If yes,
- PreSpinCameraView = 1 ; flag as first person (int declared earlier)
- Else
- PreSpinCameraView = 3 ; else flag as third person
- EndIf
- Game.ForceThirdPerson() ; IMPORTANT: Must start/run spin in third person!
- Utility.SetINIBool("bForceAutoVanityMode:Camera", true) ; Spin the idle camera around player
- EndIf
- SpinSeconds = HH_OptionSpinDuration.GetValue() as Int ; Default is 20 seconds but player can change
- Utility.Wait(SpinSeconds) ; Wait specified number of seconds
- Game.GetPlayer().SetGhost(false) ; IMPORTANT: Undo player's temporary invulnerability
- If HH_DevTracking.GetValue() as Int == 1 ; If player wants dev messages
- If Game.GetPlayer().IsGhost() == false ; If player is no longer a ghost,
- Debug.Notification("Hitchhiker: Player is not a ghost.") ; display message
- EndIf
- EndIf
- If HH_OptionSpinCamera.GetValue() as Int == 1 ; If player is spinning,
- Utility.SetINIBool("bForceAutoVanityMode:Camera", false) ; stop spinning
- Game.ForceFirstPerson() ; IMPORTANT: Call this or spin will last forever!
- If PreSpinCameraView == 3 ; If player preferred third person view,
- Game.ForceThirdPerson() ; can resume third now that spin handling is done
- EndIf
- Game.GetPlayer().ResetHealthAndLimbs() ; Undo any damage taken during spin (obsolete by ghost?)
- EndIf ; Done with optional spincam effect
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement