Difference between revisions of "SetCombatStyle - ActorBase"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>Sagitarius22
(Created page with "Category:Scripting Category:Papyrus Category:SKSE '''SKSE Member of:''' ActorBase Script Set the combat style of this actor. (This function requires SKSE) ==...")
 
imported>TidalWraith
(Added Note on Combat after testing)
 
(One intermediate revision by one other user not shown)
Line 8: Line 8:
== Syntax ==
== Syntax ==
<source lang="papyrus">
<source lang="papyrus">
Function SetCombatStyle(form combatstyle) native
Function SetCombatStyle(combatstyle cs) native
</source>
</source>


Line 20: Line 20:
*This is a function performed on an ActorBase, meaning all Actors derived from this will have this combat style.
*This is a function performed on an ActorBase, meaning all Actors derived from this will have this combat style.
*SKSE does not provide CombatStyle properties as of yet. You'll have to put the combat style in a FormList, then cast it to a CombatStyle.
*SKSE does not provide CombatStyle properties as of yet. You'll have to put the combat style in a FormList, then cast it to a CombatStyle.
*Combat Styles are locked for the duration of combat, if an Actor is in combat when this is called their combat style will not change.


== Examples ==
== Examples ==

Latest revision as of 00:21, 7 July 2015

SKSE Member of: ActorBase Script

Set the combat style of this actor. (This function requires SKSE)

Syntax[edit | edit source]

Function SetCombatStyle(combatstyle cs) native

Parameters[edit | edit source]

  • combatstyle: the combat style we choose for this actorbase.

Return Value[edit | edit source]

None.

Notes[edit | edit source]

  • This is a function performed on an ActorBase, meaning all Actors derived from this will have this combat style.
  • SKSE does not provide CombatStyle properties as of yet. You'll have to put the combat style in a FormList, then cast it to a CombatStyle.
  • Combat Styles are locked for the duration of combat, if an Actor is in combat when this is called their combat style will not change.

Examples[edit | edit source]

FormList Property List Auto
ActorBase pActorBase = Game.GetPlayer().GetActorBase()
pActorBase.SetCombatStyle(List.GetAt(1) as CombatStyle)

See Also[edit | edit source]