Editing
AddToFaction - Actor
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
[[Category:Scripting]] [[Category:Papyrus]] '''Member of:''' [[Actor Script]] Adds the Actor to a specified [[Faction Script|faction]] at rank 0. If the Actor is already in the faction, this function does nothing. == Syntax == <syntaxhighlight lang="papyrus"> Function AddToFaction(Faction akFaction) </syntaxhighlight> == Parameters == *akFaction: The [[Faction Script|faction]] to which the Actor should be added. == Return Value == None. == Examples == <syntaxhighlight lang="papyrus"> ; Add Hrothgar to the Dark Brotherhood Hrothgar.AddToFaction(DBFaction) ;Adding the player to the Falmer Faction wont make the Falmers friendly. So change their reaction. Actor property PlayerRef auto Faction property FalmerFaction auto Faction property PlayerFaction auto PlayerRef.AddToFaction(FalmerFaction) PlayerFaction.SetReaction(FalmerFaction, 3) </syntaxhighlight> <br> == Notes == *For faction members of factions normally an enemy to the player, simply adding the player to the faction will not make them friendly to the player if their [http://www.creationkit.com/AI_Data_Tab Aggression] level is "Very Aggressive". Therefore when you add the player to such factions, you must also change their reaction accordingly through [[SetReaction - Faction]] and make them a "friend". *Additionally, some actors are part of more than one enemy faction, and you must take account for this by also using SetReaction() on any other factions they are part of. * This function checks if you're in the passed in faction by calling [[IsInFaction - Actor]], and if not, calls [[SetFactionRank - Actor]] and sets your rank to 0. This may or may not be related to the above notes concerning SetReaction. More testing is needed. == See Also == *[[Actor Script]] *[[GetFactionRank - Actor]] *[[IsInFaction - Actor]] *[[ModFactionRank - Actor]] *[[RemoveFromFaction - Actor]] *[[RemoveFromAllFactions - Actor]] *[[SetFactionRank - Actor]]
Summary:
Please note that all contributions to the CreationKit Wiki are considered to be released under the Creative Commons Attribution-ShareAlike (see
CreationKit:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
Edit source
View history
More
Search
Navigation
Landing page
Tutorials
Game Systems
Editor Reference
Scripting Reference
Recent changes
Help
Tools
What links here
Related changes
Special pages
Page information
Page values