Difference between revisions of "Game Script"
Jump to navigation
Jump to search
→Global Functions
imported>Jlundin |
imported>Jog |
||
Line 14: | Line 14: | ||
== Global Functions == | == Global Functions == | ||
'''Function [[AddAchievement - Game|AddAchievement]](int aiAchievementID)''' | |||
*Adds the specified achievement/trophy to the player's gamer profile. | |||
'''Function [[AdvanceSkill - Game|AdvanceSkill]](string asSkillName, float afMagnitude)''' | |||
*Advance the given skill on the player by the provided amount of skill usage | |||
'''bool Function [[AddHavokBallAndSocketConstraint - Game|AddHavokBallAndSocketConstraint]](ObjectReference arRefA, string arRefANode, ObjectReference arRefB, string arRefBNode, float afRefALocalOffsetX, float afRefALocalOffsetY, float afRefALocalOffsetZ, float afRefBLocalOffsetX, float afRefBLocalOffsetY, float afRefBLocalOffsetZ)''' | |||
*Adds a ball-and-socket constraint between two rigid bodies, identified by their ref and node names | |||
'''int Function [[CalculateFavorCost - Game|CalculateFavorCost]](int aiFavorPrice)''' | |||
*Calculates how many points the player would have to pay for a favor of the specified price. | |||
'''Function [[ClearPrison - Game|ClearPrison]]()''' | |||
*Clears all Prison variables on the PlayerCharacter so the game will know he is out of prison. | |||
'''Function [[ClearTempEffects - Game|ClearTempEffects]]()''' | |||
*Clears all temp effects (such as terrain effects) in the game. | |||
'''Function [[DisablePlayerControls - Game|DisablePlayerControls]](bool abMovement, bool abFighting, bool abCamSwitch, bool abLooking, bool abSneaking, bool abMenu, bool abActivate, bool abJournalTabs, int aiDisablePOVType)''' | |||
*Disables the specified player controls. | |||
'''Function [[EnableFastTravel - Game|EnableFastTravel]](bool abEnable)''' | |||
*Enables or disables the player's ability to fast travel. | |||
'''Function [[EnablePlayerControls - Game|EnablePlayerControls]](bool abMovement, bool abFighting, bool abCamSwitch, bool abLooking, bool abSneaking, bool abMenu, bool abActivate, bool abJournalTabs, int aiDisablePOVType)''' | |||
*Enables the specified player controls. | |||
'''Function [[FadeOutGame - Game|FadeOutGame]](bool abFadingOut, bool abBlackFade, float afSecsBeforeFade, float afFadeDuration)''' | |||
*Fades the game in and out with the specified parameters. | |||
'''Function [[FastTravel - Game|FastTravel]](ObjectReference akDestination)''' | |||
*Fast-travels the player to the specified object's location. | |||
'''Actor Function [[FindClosestActor - Game|FindClosestActor]](float afX, float afY, float afZ, float afRadius)''' | |||
*Finds the closest actor within a given radius of a location | |||
'''Actor Function [[FindClosestActorFromRef - Game|FindClosestActorFromRef]](ObjectReference arCenter, float afRadius)''' | |||
*Finds the closest actor within a given radius of a reference | |||
'''ObjectReference Function [[FindClosestReferenceOfAnyTypeInList - Game|FindClosestReferenceOfAnyTypeInList]](FormList arBaseObjects, float afX, float afY, float afZ, float afRadius)''' | |||
*Finds the closest reference of any of the base objects in the list within a given radius of a location | |||
'''ObjectReference Function [[FindClosestReferenceOfAnyTypeInListFromRef - Game|FindClosestReferenceOfAnyTypeInListFromRef]](FormList arBaseObjects, ObjectReference arCenter, float afRadius)''' | |||
*Finds the closest reference of any of the base objects in the list within a given radius of a reference | |||
'''ObjectReference Function [[FindClosestReferenceOfType - Game|FindClosestReferenceOfType]](Form arBaseObject, float afX, float afY, float afZ, float afRadius)''' | |||
*Finds the closest reference of a given base object within a given radius of a location | |||
'''ObjectReference Function [[FindClosestReferenceOfTypeFromRef - Game|FindClosestReferenceOfTypeFromRef]](Form arBaseObject, ObjectReference arCenter, float afRadius)''' | |||
*Finds the closest reference of a given base object within a given radius of a reference | |||
'''Actor Function [[FindRandomActor - Game|FindRandomActor]](float afX, float afY, float afZ, float afRadius)''' | |||
*Finds a random actor within a given radius of a location | |||
'''Actor Function [[FindRandomActorFromRef - Game|FindRandomActorFromRef]](ObjectReference arCenter, float afRadius)''' | |||
*Finds a random actor within a given radius of a reference | |||
'''ObjectReference Function [[FindRandomReferenceOfAnyTypeInList - Game|FindRandomReferenceOfAnyTypeInList]](FormList arBaseObjects, float afX, float afY, float afZ, float afRadius)''' | |||
*Finds a random reference of any of the base objects in the list within a given radius of a location | |||
'''ObjectReference Function [[FindRandomReferenceOfAnyTypeInListFromRef - Game|FindRandomReferenceOfAnyTypeInListFromRef]](FormList arBaseObjects, ObjectReference arCenter, float afRadius)''' | |||
*Finds a random reference of any of the base objects in the list within a given radius of a reference | |||
'''ObjectReference Function [[FindRandomReferenceOfType - Game|FindRandomReferenceOfType]](Form arBaseObject, float afX, float afY, float afZ, float afRadius)''' | |||
*Finds a random reference of a given base object within a given radius of a location | |||
'''ObjectReference Function [[FindRandomReferenceOfTypeFromRef - Game|FindRandomReferenceOfTypeFromRef]](Form arBaseObject, ObjectReference arCenter, float afRadius)''' | |||
*Finds a random reference of a given base object within a given radius of a reference | |||
'''Function [[ForceFirstPerson - Game|ForceFirstPerson]]()''' | |||
*Forces the player camera into 1st-person. | |||
'''Function [[ForceThirdPerson - Game|ForceThirdPerson]]()''' | |||
*Forces the player camera into 3rd-person. | |||
'''Form Function [[GetForm - Game|GetForm]](int aiFormID)''' | |||
*Obtains a [[Form Script|Form]] from the game by its form ID number. | |||
'''float Function [[GetGameSettingFloat - Game|GetGameSettingFloat]](string asGameSetting)''' | |||
*Obtains the value of a float game setting. | |||
'''float Function [[GetGameSettingInt - Game|GetGameSettingInt]](string asGameSetting)''' | |||
*Obtains the value of an int game setting. | |||
'''float Function [[GetGameSettingString - Game|GetGameSettingString]](string asGameSetting)''' | |||
*Obtains the value of a string game setting. | |||
'''Actor Function [[GetPlayer - Game|GetPlayer]]()''' | |||
*Obtains the [[Actor Script|Actor]] that represents the player. | |||
'''ObjectReference Function [[GetPlayerGrabbedRef - Game|GetPlayerGrabbedRef]]()''' | |||
*Obtains the [[ObjectReference Script|ObjectReference]] the player is currently grabbing. | |||
'''Actor Function [[GetPlayersLastRiddenHorse - Game|GetPlayersLastRiddenHorse]]()''' | |||
*Gets this actors last ridden horse if it is the player. Returns None if player has not ridden a horse is not the player. | |||
'''float Function [[GetRealHoursPassed - Game|GetRealHoursPassed]]()''' | |||
*Returns the number of real-life hours that have passed playing the game. | |||
'''Function [[HideTitleSequenceMenu - Game|HideTitleSequenceMenu]]()''' | |||
*Hides the title sequence menu. | |||
'''Function [[IncrementSkill - Game|IncrementSkill]](string asSkillName)''' | |||
*Advances the provided Skill by the one point (for the player only). | |||
'''Function [[IncrementSkillBy - Game|IncrementSkillBy]](string asSkillName, int aiCount)''' | |||
*Advances the provided Skill by the given number of points (for the player only). | |||
'''Function [[IncrementStat - Game|IncrementStat]](string asStatName, int aiModAmount) native global''' | |||
*Modifies the specified MiscStat by the given amount | |||
'''bool Function [[IsActivateControlsEnabled - Game|IsActivateControlsEnabled]]()''' | |||
*Are the activation controls enabled? | |||
'''bool Function [[IsCamSwitchControlsEnabled - Game|IsCamSwitchControlsEnabled]]()''' | |||
*Are the camera switch controls enabled? | |||
'''bool Function [[IsFastTravelEnabled - Game|IsFastTravelEnabled]]()''' | |||
*Is fast travel enabled? | |||
'''bool Function [[IsFightingControlsEnabled - Game|IsFightingControlsEnabled]]()''' | |||
*Are the fighting controls enabled? | |||
'''bool Function [[IsJournalControlsEnabled - Game|IsJournalControlsEnabled]]()''' | |||
*Are the journal menu controls enabled? | |||
'''bool Function [[IsLookingControlsEnabled - Game|IsLookingControlsEnabled]]()''' | |||
*Are the looking controls enabled? | |||
'''bool Function [[IsMenuControlsEnabled - Game|IsMenuControlsEnabled]]()''' | |||
*Are the menu controls enabled? | |||
'''bool Function [[IsMovementControlsEnabled - Game|IsMovementControlsEnabled]]()''' | |||
*Are the movement controls enabled? | |||
'''bool Function [[IsSneakingControlsEnabled - Game|IsSneakingControlsEnabled]]()''' | |||
*Are the sneaking controls enabled? | |||
'''bool Function [[IsWordUnlocked - Game|IsWordUnlocked]](WordOfPower akWord)''' | |||
*Is the word of power unlocked on the player? | |||
'''Function [[PlayBink - Game|PlayBink]](string asFileName, bool abInterruptible, bool abMuteAudio, bool abMuteMusic, bool abLetterbox)''' | |||
*Plays a bink video | |||
'''Function [[PrecacheCharGen - Game|PrecacheCharGen]]()''' | |||
*Precaches all the data used by character gen to avoid hitches with file I/O. | |||
'''Function [[PrecacheCharGenClear - Game|PrecacheCharGenClear]]()''' | |||
*Clears all the previously cached data used by character gen. | |||
'''int Function [[QueryStat - Game|QueryStat]](string asStat)''' | |||
*Queries the given stat and returns its value. | |||
'''Function [[QuitToMainMenu - Game|QuitToMainMenu]]()''' | |||
*Forces the game back to the main menu. | |||
'''bool Function [[RemoveHavokConstraints - Game|RemoveHavokConstraints]](ObjectReference arFirstRef, string arFirstRefNodeName, ObjectReference arSecondRef, string arSecondRefNodeName)''' | |||
*Removes any constraint between two rigid bodies | |||
'''Function [[RequestAutoSave - Game|RequestAutoSave]]()''' | |||
*Requests for an auto-save to be made. | |||
'''Function [[RequestModel - Game|RequestModel]](string asModelName)''' | |||
*Requests the specified model. | |||
'''Function [[RequestSave - Game|RequestSave]]()''' | |||
*Requests for a normal save to be made. | |||
'''Function [[SendWereWolfTransformation - Game|SendWereWolfTransformation]]()''' | |||
*Finds an actor in high who can detect the player to call werewolf crime on the player | |||
'''Function [[ServeTime - Game|ServeTime]]()''' | |||
*Has the player serve their jail time. | |||
'''Function [[SetBeastForm - Game|SetBeastForm]](bool abEntering)''' | |||
*Flags the player as being in/out of "beast form". | |||
'''Function [[SetCameraTarget - Game|SetCameraTarget]](Actor arTarget)''' | |||
*Sets the camera target actor | |||
'''Function [[SetHudCartMode - Game|SetHudCartMode]](bool abSetCartMode)''' | |||
*Flags the HUD as being in "cart mode" or not. | |||
'''Function [[SetInChargen - Game|SetInChargen]](bool abDisableSaving, bool abDisableWaiting, bool abShowControlsDisabledMessage)''' | |||
*Enable/disable various functionality which we want in chargen. | |||
'''Function [[SetPlayerAIDriven - Game|SetPlayerAIDriven]](bool abAIDriven)''' | |||
*Enables or disables the AI driven flag on the player. | |||
'''Function [[SetPlayerReportCrime - Game|SetPlayerReportCrime]](bool abReportCrime)''' | |||
*Set the state of the player as an actor who commits crimes | |||
'''Function [[SetSittingRotation - Game|SetSittingRotation]](float afValue)''' | |||
*Set the player's sitting camera offset rotation. | |||
'''Function [[ShakeCamera - Game|ShakeCamera]](ObjectReference akSource, float afStrength)''' | |||
*Shakes the camera from the specified location with the specified strength. | |||
'''Function [[ShakeController - Game|ShakeController]](float afLeftStrength, float afRightStrength, float afDuration)''' | |||
*Shakes the controller for the specified amount of time. | |||
'''Function [[ShowFirstPersonGeometry - Game|ShowFirstPersonGeometry]](bool abShow)''' | |||
*Shows or hides the first-person geometry | |||
'''Function [[ShowRaceMenu - Game|ShowRaceMenu]]()''' | |||
*Shows the race/sex change menu. | |||
'''Function [[ShowTitleSequenceMenu - Game|ShowTitleSequenceMenu]]()''' | |||
*Shows the title sequence menu. | |||
'''Function [[ShowTrainingMenu - Game|ShowTrainingMenu]](Actor aActor)''' | |||
*Shows the training menu provided by actor parameter. | |||
'''Function [[StartTitleSequence - Game|StartTitleSequence]](string asSequenceName)''' | |||
*Plays the specified sequence in the title menu. | |||
'''Function [[TeachWord - Game|TeachWord]](WordOfPower akWord)''' | |||
*Teaches the specified [[WordOfPower Script|WordOfPower]] to the player | |||
'''Function [[TriggerScreenBlood - Game|TriggerScreenBlood]](int aiValue)''' | |||
*Trigger on-screen blood splatter. | |||
'''Function [[UnlockWord - Game|UnlockWord]](WordOfPower akWord)''' | |||
*Unlocks the specified [[WordOfPower Script|WordOfPower]] so the player can use it | |||
'''bool Function [[UsingGamepad - Game|UsingGamepad]]()''' | |||
*Returns whether the player is using a gamepad or not. | |||
== Member Functions == | == Member Functions == |