Difference between revisions of "Cell Script"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>PurpleLunchbox
imported>Svarr
m (→‎SKSE Member Functions: Corrected return type of GetWaterLevel())
 
(5 intermediate revisions by 4 users not shown)
Line 1: Line 1:
[[Category:Scripting]]
[[Category:Papyrus]]
[[Category:Script Objects]]
[[Category:SKSE]]
'''Extends:''' [[Form Script]]
'''Extends:''' [[Form Script]]


Line 13: Line 8:
</source>
</source>


== Properties ==
None


== Global Functions ==
== Member Functions ==
None
 
:'''ActorBase [[GetActorOwner - Cell|GetActorOwner]]()'''
:*Obtains the actor base object that owns this cell.


== Member Functions ==
:'''Faction [[GetFactionOwner - Cell|GetFactionOwner]]()'''
'''ActorBase Function [[GetActorOwner - Cell|GetActorOwner]]()'''
:*Obtains the faction that owns this cell.
*Obtains the actor base object that owns this cell.


'''Faction Function [[GetFactionOwner - Cell|GetFactionOwner]]()'''
:'''Bool [[IsAttached - Cell|IsAttached]]()'''
*Obtains the faction that owns this cell.
:*Is this cell currently attached?


'''bool Function [[IsAttached - Cell|IsAttached]]()'''
:'''Bool [[IsInterior - Cell|IsInterior]]()'''
*Is this cell currently attached?
:*Is this cell an interior cell?


'''bool Function [[IsInterior - Cell|IsInterior]]()'''
:'''[[Reset - Cell|Reset]]()'''
*Is this cell an interior cell?
:*Flags this cell for reset on next load.


'''Function [[Reset - Cell|Reset]]()'''
:'''[[SetActorOwner - Cell|SetActorOwner]](ActorBase ''akActorBase'')'''
*Flags this cell for reset on next load.
:*Sets the actor base as this cell's owner.


'''Function [[SetActorOwner - Cell|SetActorOwner]](ActorBase akActorBase)'''
:'''[[SetFactionOwner - Cell|SetFactionOwner]](Faction ''akFaction'')'''
*Sets the actor base as this cell's owner.
:*Sets the faction as this cell's owner.


'''Function [[SetFactionOwner - Cell|SetFactionOwner]](Faction akFaction)'''
:'''[[SetFogColor - Cell|SetFogColor]](Int ''aiNearRed'', Int ''aiNearGreen'', Int ''aiNearBlue'', Int ''aiFarRed'', Int ''aiFarGreen'', Int ''aiFarBlue'')'''
*Sets the faction as this cell's owner.
:*Sets the near and far fog colors for the cell. Only works in non-sky-lit interiors.


'''Function [[SetFogColor - Cell|SetFogColor]](int aiNearRed, int aiNearGreen, int aiNearBlue, int aiFarRed, int aiFarGreen, int aiFarBlue)'''
:'''[[SetFogPlanes - Cell|SetFogPlanes]](Float ''afNear'', Float ''afFar'')'''
*Sets the near and far fog colors for the cell. Only works in non-sky-lit interiors.
:*Sets the near and far fog plane distances for this cell. Only works in non-sky-lit interiors.


'''Function [[SetFogPlanes - Cell|SetFogPlanes]](float afNear, float afFar)'''
:'''[[SetFogPower - Cell|SetFogPower]](Float ''afPower'')'''
*Sets the near and far fog plane distances for this cell. Only works in non-sky-lit interiors.
:*Sets the fog power for this cell. Only works in non-sky-lit interiors.


'''Function [[SetFogPower - Cell|SetFogPower]](float afPower)'''
:'''[[SetPublic - Cell|SetPublic]](Bool ''abPublic'')'''
*Sets the fog power for this cell. Only works in non-sky-lit interiors.
:*Sets this cell as either public or private.


'''Function [[SetPublic - Cell|SetPublic]](bool abPublic)'''
*Sets this cell as either public or private.


== SKSE Member Functions ==
== SKSE Member Functions ==
'''int Function [[GetNumRefs - Cell|GetNumRefs]](int formTypeFilter = 0)'''
*Returns the number of references in the cell that match the form filter (or all if formTypeFilter is 0).


'''ObjectReference Function [[GetNthRef - Cell|GetNthRef]](int n, int formTypeFilter = 0)'''
:'''Int [[GetNumRefs - Cell|GetNumRefs]](Int ''formTypeFilter'')'''
*Returns the specified reference in the cell that matches the form filter.
:*Returns the number of references in the cell that match the form filter (or all if formTypeFilter is 0).


== Events ==
:'''ObjectReference [[GetNthRef - Cell|GetNthRef]](Int ''n'', Int ''formTypeFilter'')'''
None
:*Returns the specified reference in the cell that matches the form filter.
 
:'''Float [[GetWaterLevel]]()'''
:*Returns the water level of the cell. (will be -2147483648 if no water)
 
 
[[Category:Scripting]]
[[Category:Papyrus]]
[[Category:Script Objects]]
[[Category:SKSE]]
[[Category:SKSE Script Objects]]

Latest revision as of 07:44, 14 July 2016

Extends: Form Script

Script for the manipulation of cells.

Definition[edit | edit source]

ScriptName Cell extends Form


Member Functions[edit | edit source]

ActorBase GetActorOwner()
  • Obtains the actor base object that owns this cell.
Faction GetFactionOwner()
  • Obtains the faction that owns this cell.
Bool IsAttached()
  • Is this cell currently attached?
Bool IsInterior()
  • Is this cell an interior cell?
Reset()
  • Flags this cell for reset on next load.
SetActorOwner(ActorBase akActorBase)
  • Sets the actor base as this cell's owner.
SetFactionOwner(Faction akFaction)
  • Sets the faction as this cell's owner.
SetFogColor(Int aiNearRed, Int aiNearGreen, Int aiNearBlue, Int aiFarRed, Int aiFarGreen, Int aiFarBlue)
  • Sets the near and far fog colors for the cell. Only works in non-sky-lit interiors.
SetFogPlanes(Float afNear, Float afFar)
  • Sets the near and far fog plane distances for this cell. Only works in non-sky-lit interiors.
SetFogPower(Float afPower)
  • Sets the fog power for this cell. Only works in non-sky-lit interiors.
SetPublic(Bool abPublic)
  • Sets this cell as either public or private.


SKSE Member Functions[edit | edit source]

Int GetNumRefs(Int formTypeFilter)
  • Returns the number of references in the cell that match the form filter (or all if formTypeFilter is 0).
ObjectReference GetNthRef(Int n, Int formTypeFilter)
  • Returns the specified reference in the cell that matches the form filter.
Float GetWaterLevel()
  • Returns the water level of the cell. (will be -2147483648 if no water)