Difference between revisions of "SetFavorites - FavoritesManager"

From the Fallout4 CreationKit Wiki
Jump to navigation Jump to search
imported>Qazaaq
(added f4se member)
 
imported>Qazaaq
m (Scrivener07 moved page F4SE:SetFavorites - FavoritesManager to SetFavorites - FavoritesManager over redirect)
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
'''F4SE Member of:''' [[FavoritesManager Script]]
'''Member of:''' [[FavoritesManager Script]]
{{Template:Papyrus:RequiredF4SE|version=0.6.5}}
{{Template:Papyrus:RequiredF4SE|version=0.6.5}}


Line 10: Line 10:


== Parameters ==
== Parameters ==
*''favorites:'' An array of 12 [[Form Script|Forms]] to be favorited. A none entry will clear the favorited slot.
*'''favorites:''' An array of 12 [[Form Script|Forms]] to be favorited. A none entry will clear the favorited slot.


== Examples ==
== Examples ==
<source lang="papyrus">
<source lang="papyrus">
Weapon Property PipeGun Auto Const Mandatory
Armor Property Armor_MiningHelmet Auto Const Mandatory
Potion Property Stimpak Auto Const Mandatory
Event OnInit()
    {favorite 3 forms}
    Form[] favorites = new Form[12]
    favorites[0] = PipeGun
    favorites[3] = Armor_MiningHelmet
    favorites[7] = Stimpak
    FavoritesManager.SetFavorites(favorites)
    Debug.Trace("Favorites manager has favorited " + favorites.Length + " items.")
EndEvent
</source>
</source>



Latest revision as of 13:52, 22 April 2018

Member of: FavoritesManager Script
Requires F4SE version 0.6.5 or higher.

Sets all 12 favorites which may contain none entries.

Syntax[edit | edit source]

Function SetFavorites(Form[] favorites) Global Native

Parameters[edit | edit source]

  • favorites: An array of 12 Forms to be favorited. A none entry will clear the favorited slot.

Examples[edit | edit source]

Weapon Property PipeGun Auto Const Mandatory
Armor Property Armor_MiningHelmet Auto Const Mandatory
Potion Property Stimpak Auto Const Mandatory

Event OnInit()
    {favorite 3 forms}
    Form[] favorites = new Form[12]
    favorites[0] = PipeGun
    favorites[3] = Armor_MiningHelmet
    favorites[7] = Stimpak
    FavoritesManager.SetFavorites(favorites)
    Debug.Trace("Favorites manager has favorited " + favorites.Length + " items.")
EndEvent

Notes[edit | edit source]

None

See Also[edit | edit source]