Difference between revisions of "SetFactionRank"
Jump to navigation
Jump to search
imported>Kkuhlmann |
imported>Gribbleshnibit8 (Added page information from CS wiki and converted to function template.) |
||
(3 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
{{Function | |||
|CSWikiPage = SetFactionRank | |||
|origin = GECK1 | |||
|summary = Sets the actor's rank in the specified [[:Category:Factions|faction]]. If the actor is not a member of the faction, adds them to the faction at the new rank. | |||
|name = SetFactionRank | |||
|referenceType = ''Actor'' | |||
|arguments = | |||
{{FunctionArgument | |||
|Name = FactionID | |||
|Type = faction | |||
}}{{FunctionArgument | |||
|Name = newRank | |||
|Type = int | |||
|Optional = y | |||
}} | |||
|example = KarenSchenzyREF.SetFactionRank ArefuFaction 1 | |||
Sets Karen to rank one in the ArefuFaction faction. | |||
Player.SetFactionRank ArefuFaction -1 | |||
This will remove the palyer from the ArefuFaction faction. | |||
}} | |||
==Notes== | |||
The faction rank is set on the actor's [[Glossary#B|base object]] as well as on the actor ([[reference]]) itself. Any actor spawned from the same base object (by a [[Leveled Creature|leveled list]], by [[PlaceAtMe]] and so on) will have this faction, at the same rank, already set. This is not a problem for named characters (of which there is usually just one in the world), but ''can'' be a problem for random, unnamed characters or creatures. | |||
==See also== | |||
* [[GetFactionRank]] | |||
* [[GetFactionRankDifference]] | |||
* [[ModFactionRank]] | |||
[[Category:Functions]] | [[Category:Functions]] | ||
[[Category:Functions (GECK 1.1)]] | |||
[[Category:Faction Functions]] | [[Category:Faction Functions]] | ||
[[Category:Faction Functions (GECK 1.1)]] |
Latest revision as of 16:48, 28 November 2014
< [[::Category:Functions|Category:Functions]]
Link to TES4 Construction Set Wiki: SetFactionRank.
A function included in the GECK version 1.1.0.36.
Description
Sets the actor's rank in the specified faction. If the actor is not a member of the faction, adds them to the faction at the new rank.
Syntax
'Actor.SetFactionRank FactionID:faction newRank:int
Example
KarenSchenzyREF.SetFactionRank ArefuFaction 1
Sets Karen to rank one in the ArefuFaction faction.
Player.SetFactionRank ArefuFaction -1
This will remove the palyer from the ArefuFaction faction.
Notes
The faction rank is set on the actor's base object as well as on the actor (reference) itself. Any actor spawned from the same base object (by a leveled list, by PlaceAtMe and so on) will have this faction, at the same rank, already set. This is not a problem for named characters (of which there is usually just one in the world), but can be a problem for random, unnamed characters or creatures.