Difference between revisions of "User:CraftySentinel"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>CraftySentinel
imported>CraftySentinel
m (Updated to allow word wrapping for examples)
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Game Script: Global Functions (Example)==


= Abs - Math =
{|class="wikitable" width =100%
|-
|align="right" style="width:5%; border-width: 1px 0 0 0"|
|style="border-width: 1px 0 0 0"|
|style="border-width: 1px 0 0 0"|[[AddAchievement - Game|'''AddAchievement''']](Int ''aiAchievementID'')


|-
|style="border-width: 0 0 1px 0"|
|style="border-width: 0 0 1px 0"|
|style="border-width: 0 0 1px 0"|Adds the specified achievement/trophy to the player's gamer profile.
|-


__NOTOC__
|align="right" style="border-width: 1px 0 0 0"|
<div style=" padding: 5px 5px 5px 5px; border-top: 1px solid #C0C0C0; border-bottom: 1px solid #C0C0C0;"> [[Math Script]] <span style="font-size:16px;">►</span> [[Math Script#Member Functions|Global Member Functions]] <span style="font-size:16px;">►</span> [[Abs - Math|Abs]]
|style="border-width: 1px 0 0 0"|
</div>
|style="border-width: 1px 0 0 0"|[[AddPerkPoints - Game|'''AddPerkPoints''']](Int ''aiPerkPoints'')
|-
|style="border-width: 0 0 1px 0"|
|style="border-width: 0 0 1px 0"|
|style="border-width: 0 0 1px 0"|Adds the given number of perk points to the player. Clamped at 255.
|-


|align="right" style="border-width: 1px 0 0 0"|
|style="border-width: 1px 0 0 0"|
|style="border-width: 1px 0 0 0"|[[AdvanceSkill - Game|'''AdvanceSkill''']](String ''asSkillName'', Float ''afMagnitude'')
|-
|style="border-width: 0 0 1px 0"|
|style="border-width: 0 0 1px 0"|
|style="border-width: 0 0 1px 0"|Advance the given skill on the player by the provided amount of skill usage
|-


::Calculates the absolute value of the number it is given.
|align="right" valign="top" style="border-width: 1px 0 0 0"|Bool
|style="border-width: 1px 0 0 0"|
|style="border-width: 1px 0 0 0; padding-left: 18em; text-indent: -18em;"|[[AddHavokBallAndSocketConstraint - Game|'''AddHavokBallAndSocketConstraint''']](ObjectReference&nbsp;''arRefA'', String&nbsp;''arRefANode'', ObjectReference&nbsp;''arRefB'', String&nbsp;''arRefBNode'', Float&nbsp;''afRefALocalOffsetX'', Float&nbsp;''afRefALocalOffsetY'', Float&nbsp;''afRefALocalOffsetZ'', Float&nbsp;''afRefBLocalOffsetX'', Float&nbsp;''afRefBLocalOffsetY'', Float&nbsp;''afRefBLocalOffsetZ'')
|-
|style="border-width: 0 0 1px 0"|
|style="border-width: 0 0 1px 0"|
|style="border-width: 0 0 1px 0"|Adds a ball-and-socket constraint between two rigid bodies, identified by their ref and node names
|-


== Syntax ==
|align="right" style="border-width: 1px 0 0 0"|Int
<source lang="papyrus">
|style="border-width: 1px 0 0 0"|
float Function abs(float afValue) native global
|style="border-width: 1px 0 0 0"|[[CalculateFavorCost - Game|'''CalculateFavorCost''']](Int ''aiFavorPrice'')
</source>
|-
|style="border-width: 0 0 1px 0"|
|style="border-width: 0 0 1px 0"|
|style="border-width: 0 0 1px 0"|Calculates how many points the player would have to pay for a favor of the specified price.
|-


==== Parameters ====
|align="right" style="border-width: 1px 0 0 0"|
<tt>afValue</tt>
|style="border-width: 1px 0 0 0"|
::The value to get the absolute value of.
|style="border-width: 1px 0 0 0"|[[ClearPrison - Game|'''ClearPrison'''()]]
|-
|style="border-width: 0 0 1px 0"|
|style="border-width: 0 0 1px 0"|
|style="border-width: 0 0 1px 0"|Clears all Prison variables on the PlayerCharacter so the game will know he is out of prison.
|}


==== Return Value ====
==Game Script: Global Functions (Alternate Example)==
The absolute value of the passed-in value.


{|class="wikitable" width =100%
|-
|align="right" style="width:5%; border-width: 1px 0 0 0"|
|style="border-width: 1px 0 0 0"|
|style="border-width: 1px 0 0 0"|[[AddAchievement - Game|'''AddAchievement''']](Int ''aiAchievementID'')


== Examples ==
|-
<source lang="papyrus">
|style="border-width: 0 0 1px 0"|
float x = math.abs(5.0) ; x == 5
|style="border-width: 0 0 1px 0"|
float y = math.abs(-5.0) ; y == 5
|style="border-width: 0 0 1px 0"|Adds the specified achievement/trophy to the player's gamer profile.
</source>
|-


== See Also ==
|align="right" style="border-width: 1px 0 0 0"|
*[[Math Script]]
|style="border-width: 1px 0 0 0"|
|style="border-width: 1px 0 0 0"|[[AddPerkPoints - Game|'''AddPerkPoints''']](Int ''aiPerkPoints'')
|-
|style="border-width: 0 0 1px 0"|
|style="border-width: 0 0 1px 0"|
|style="border-width: 0 0 1px 0"|Adds the given number of perk points to the player. Clamped at 255.
|-


|align="right" style="border-width: 1px 0 0 0"|
|style="border-width: 1px 0 0 0"|
|style="border-width: 1px 0 0 0"|[[AdvanceSkill - Game|'''AdvanceSkill''']](String ''asSkillName'', Float ''afMagnitude'')
|-
|style="border-width: 0 0 1px 0"|
|style="border-width: 0 0 1px 0"|
|style="border-width: 0 0 1px 0"|Advance the given skill on the player by the provided amount of skill usage
|-


|align="right" valign="top" style="border-width: 1px 0 0 0"|Bool
|style="border-width: 1px 0 0 0"|
|style="border-width: 1px 0 0 0; padding-left: 2em; text-indent: -2em;"|[[AddHavokBallAndSocketConstraint - Game|'''AddHavokBallAndSocketConstraint''']](ObjectReference&nbsp;''arRefA'', String&nbsp;''arRefANode'', ObjectReference&nbsp;''arRefB'', String&nbsp;''arRefBNode'', Float&nbsp;''afRefALocalOffsetX'', Float&nbsp;''afRefALocalOffsetY'', Float&nbsp;''afRefALocalOffsetZ'', Float&nbsp;''afRefBLocalOffsetX'', Float&nbsp;''afRefBLocalOffsetY'', Float&nbsp;''afRefBLocalOffsetZ'')
|-
|style="border-width: 0 0 1px 0"|
|style="border-width: 0 0 1px 0"|
|style="border-width: 0 0 1px 0"|Adds a ball-and-socket constraint between two rigid bodies, identified by their ref and node names
|-
|align="right" style="border-width: 1px 0 0 0"|Int
|style="border-width: 1px 0 0 0"|
|style="border-width: 1px 0 0 0"|[[CalculateFavorCost - Game|'''CalculateFavorCost''']](Int ''aiFavorPrice'')
|-
|style="border-width: 0 0 1px 0"|
|style="border-width: 0 0 1px 0"|
|style="border-width: 0 0 1px 0"|Calculates how many points the player would have to pay for a favor of the specified price.
|-
|align="right" style="border-width: 1px 0 0 0"|
|style="border-width: 1px 0 0 0"|
|style="border-width: 1px 0 0 0"|[[ClearPrison - Game|'''ClearPrison'''()]]
|-
|style="border-width: 0 0 1px 0"|
|style="border-width: 0 0 1px 0"|
|style="border-width: 0 0 1px 0"|Clears all Prison variables on the PlayerCharacter so the game will know he is out of prison.
|}


<hr />
<hr />
<!-- Just here....Just cause.[[Category:Scripting]]
 
[[Category:Papyrus]]
[[Category:Non-delayed Native Function]]-->


Hey, this here be my User page... It's not much to look at but hey who actually looks at peoples user pages?
Hey, this here be my User page... It's not much to look at but hey who actually looks at peoples user pages?

Latest revision as of 01:22, 3 November 2013

Game Script: Global Functions (Example)[edit | edit source]

AddAchievement(Int aiAchievementID)
Adds the specified achievement/trophy to the player's gamer profile.
AddPerkPoints(Int aiPerkPoints)
Adds the given number of perk points to the player. Clamped at 255.
AdvanceSkill(String asSkillName, Float afMagnitude)
Advance the given skill on the player by the provided amount of skill usage
Bool 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 CalculateFavorCost(Int aiFavorPrice)
Calculates how many points the player would have to pay for a favor of the specified price.
ClearPrison()
Clears all Prison variables on the PlayerCharacter so the game will know he is out of prison.

Game Script: Global Functions (Alternate Example)[edit | edit source]

AddAchievement(Int aiAchievementID)
Adds the specified achievement/trophy to the player's gamer profile.
AddPerkPoints(Int aiPerkPoints)
Adds the given number of perk points to the player. Clamped at 255.
AdvanceSkill(String asSkillName, Float afMagnitude)
Advance the given skill on the player by the provided amount of skill usage
Bool 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 CalculateFavorCost(Int aiFavorPrice)
Calculates how many points the player would have to pay for a favor of the specified price.
ClearPrison()
Clears all Prison variables on the PlayerCharacter so the game will know he is out of prison.


Hey, this here be my User page... It's not much to look at but hey who actually looks at peoples user pages?

I enjoy a good bit o modding started with Mount and Blade Warbands then moved onto Oblivion, X3, and now here I am contributing to this here Creation kit wiki.

Since I don't want you to leave empty handed here's a navbar of all Papyrus Script Objects enjoy:

Script Function Nav Box[edit | edit source]

Papyrus Script Objects
Action - Activator - ActiveMagicEffect - Actor - ActorBase - Alias - Ammo - Apparatus - Armor - ArmorAddon - AssociationType - Book - Cell - Class - ColorForm - CombatStyle - ConstructibleObject - Container - Debug - Door - EffectShader - Enchantment - EncounterZone - EquipSlot - Explosion - Faction - Flora - Form - FormList - Furniture - Game - GlobalVariable - Hazard - HeadPart - Idle - ImageSpaceModifier - ImpactDataSet - Ingredient - Input - Key - Keyword - LeveledActor - LeveledItem - LeveledSpell - Light - Location - LocationAlias - LocationRefType - MagicEffect - Math - Message - MiscObject - MusicType - ObjectReference - Outfit - Package - Perk - Potion - Projectile - Quest - Race - ReferenceAlias - Scene - Scroll - Shout - SKSE - SoulGem - Sound - SoundCategory - Spell - Static - StringUtil - TalkingActivator - TextureSet - Topic - TopicInfo - UI - Utility - VisualEffect - VoiceType - Weapon - Weather - WordOfPower - WorldSpace