Difference between revisions of "Form Script"
imported>Cipscis |
imported>Jog |
||
Line 17: | Line 17: | ||
== Member Functions == | == Member Functions == | ||
'''int Function [[GetFormID - Form|GetFormID]]()''' | |||
*Returns this form's form ID. | |||
'''int Function [[GetGoldValue - Form|GetGoldValue]]()''' | |||
*Returns this form's value in gold. | |||
'''bool Function [[HasKeyword - Form|HasKeyword]](Keyword akKeyword)''' | |||
*Returns if this form has the specified [[Keyword Script|Keyword]] attached. | |||
'''Function [[PlayerKnows - Form|PlayerKnows]]()''' | |||
*Is the "Known" flag set on the form? | |||
'''Function [[RegisterForAnimationEvent - Form|RegisterForAnimationEvent]](ObjectReference akSender, string asEventName)''' | |||
*Registers this form to receive the specified animation event from the specified object. | |||
'''Function [[RegisterForLOS - Form|RegisterForLOS]](Actor akViewer, ObjectReference akTarget)''' | |||
*Registers this form to receive gain and lost LOS events between the viewer and the target. | |||
'''Function [[RegisterForSingleLOSGain - Form|RegisterForSingleLOSGain]](Actor akViewer, ObjectReference akTarget)''' | |||
*Registers this form to receive a single LOS gain event when the viewer sees the target. | |||
'''Function [[RegisterForSingleLOSLost - Form|RegisterForSingleLOSLost]](Actor akViewer, ObjectReference akTarget)''' | |||
*Registers this form to receive a single LOS lost event when the viewer loses sight of the target. | |||
'''Function [[RegisterForSingleUpdate - Form|RegisterForSingleUpdate]](float afInterval)''' | |||
*Registers this form to receive a single update event in the specified time. | |||
'''Function [[RegisterForSingleUpdateGameTime - Form|RegisterForSingleUpdateGameTime]](float afInterval)''' | |||
*Registers this form to receive a single update event in the specified number of game hours. | |||
'''Function [[RegisterForSleep - Form|RegisterForSleep]]()''' | |||
*Registers this form to receive sleep events for when the player goes to sleep or wakes up. | |||
'''Function [[RegisterForTrackedStatsEvent - Form|RegisterForTrackedStatsEvent]]()''' | |||
*Registers this form to receive tracked stats events for when tracked stats are updated. | |||
'''Function [[RegisterForUpdate - Form|RegisterForUpdate]](float afInterval)''' | |||
*Registers this form to receive update events with the specified interval, or changes the update interval. | |||
'''Function [[RegisterForUpdateGameTime - Form|RegisterForUpdateGameTime]](float afInterval)''' | |||
*Registers this form to receive update events with the specified interval in game time hours, or changes the update interval. | |||
'''Function [[StartObjectProfiling - Form|StartObjectProfiling]]()''' | |||
*Starts profiling all scripts attached to this form. | |||
'''Function [[StopObjectProfiling - Form|StopObjectProfiling]]()''' | |||
*Stops profiling all scripts attached to this form. | |||
'''Function [[UnregisterForAnimationEvent - Form|UnregisterForAnimationEvent]](ObjectReference akSender, string asEventName)''' | |||
*Unregisters this from from receiving the specified animation event from the specified object. | |||
'''Function [[UnregisterForLOS - Form|UnregisterForLOS]](Actor akViewer, ObjectReference akTarget)''' | |||
*Unregisters this form from any LOS events between the viewer and target. | |||
'''Function [[UnregisterForSleep - Form|UnregisterForSleep]]()''' | |||
*Unregisters this form from sleep events. | |||
'''Function [[UnregisterForTrackedStatsEvent - Form|UnregisterForTrackedStatsEvent]]()''' | |||
*Unregisters this form from tracked stats events. | |||
'''Function [[UnregisterForUpdate - Form|UnregisterForUpdate]]()''' | |||
*Unregisters this form from update events. | |||
'''Function [[UnregisterForUpdateGameTime - Form|UnregisterForUpdateGameTime]]()''' | |||
*Unregisters this form from game time update events. | |||
== Events == | == Events == |
Revision as of 12:45, 20 February 2012
Native base script for every form in the game.
Definition
ScriptName Form
Properties
None
Global Functions
None
Member Functions
int Function GetFormID()
- Returns this form's form ID.
int Function GetGoldValue()
- Returns this form's value in gold.
bool Function HasKeyword(Keyword akKeyword)
- Returns if this form has the specified Keyword attached.
Function PlayerKnows()
- Is the "Known" flag set on the form?
Function RegisterForAnimationEvent(ObjectReference akSender, string asEventName)
- Registers this form to receive the specified animation event from the specified object.
Function RegisterForLOS(Actor akViewer, ObjectReference akTarget)
- Registers this form to receive gain and lost LOS events between the viewer and the target.
Function RegisterForSingleLOSGain(Actor akViewer, ObjectReference akTarget)
- Registers this form to receive a single LOS gain event when the viewer sees the target.
Function RegisterForSingleLOSLost(Actor akViewer, ObjectReference akTarget)
- Registers this form to receive a single LOS lost event when the viewer loses sight of the target.
Function RegisterForSingleUpdate(float afInterval)
- Registers this form to receive a single update event in the specified time.
Function RegisterForSingleUpdateGameTime(float afInterval)
- Registers this form to receive a single update event in the specified number of game hours.
Function RegisterForSleep()
- Registers this form to receive sleep events for when the player goes to sleep or wakes up.
Function RegisterForTrackedStatsEvent()
- Registers this form to receive tracked stats events for when tracked stats are updated.
Function RegisterForUpdate(float afInterval)
- Registers this form to receive update events with the specified interval, or changes the update interval.
Function RegisterForUpdateGameTime(float afInterval)
- Registers this form to receive update events with the specified interval in game time hours, or changes the update interval.
Function StartObjectProfiling()
- Starts profiling all scripts attached to this form.
Function StopObjectProfiling()
- Stops profiling all scripts attached to this form.
Function UnregisterForAnimationEvent(ObjectReference akSender, string asEventName)
- Unregisters this from from receiving the specified animation event from the specified object.
Function UnregisterForLOS(Actor akViewer, ObjectReference akTarget)
- Unregisters this form from any LOS events between the viewer and target.
Function UnregisterForSleep()
- Unregisters this form from sleep events.
Function UnregisterForTrackedStatsEvent()
- Unregisters this form from tracked stats events.
Function UnregisterForUpdate()
- Unregisters this form from update events.
Function UnregisterForUpdateGameTime()
- Unregisters this form from game time update events.
Events
- Event OnAnimationEvent(ObjectReference akSource, string asEventName)
- Received when one of animation events we are listening for is recieved.
- Event OnAnimationEventUnregistered(ObjectReference akSource, string asEventName)
- Received when one of the animation events we are listening for has been automatically unregistered by the game due to the target animation graph unloading.
- Event OnGainLOS(Actor akViewer, ObjectReference akTarget)
- Received when the viewer goes from not seeing the target to seeing the target - if this form is registered.
- Event OnLostLOS(Actor akViewer, ObjectReference akTarget)
- Received when the viewer goes from seeing the target to not seeing the target - if this form is registered.
- Event OnSleepStart(float afSleepStartTime, float afDesiredSleepEndTime)
- Received when the player goes to sleep.
- Event OnSleepStop(bool abInterrupted)
- Received when the player wakes up or is interrupted in sleep.
- Event OnTrackedStatsEvent(string asStat, in aiStatValue)
- Received when tracked stats are updated.
- Event OnUpdate()
- Received at periodic intervals, if the form is registered.
- Event OnUpdateGameTime()
- Received at periodic intervals of game time, if the form is registered.