Difference between revisions of "GetFormID - Form"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>JustinOther
m (→‎See Also: Linked FrmID Array)
imported>Terra Nova2
(Compiler converts return value to decimal.)
Line 20: Line 20:
; Obtains the form id of the main quest
; Obtains the form id of the main quest
int formID = mainQuest.GetFormID()
int formID = mainQuest.GetFormID()
</source>
== Notes ==
* Name can be misleading to anyone expecting the return value to be the value for a form found in the Creation Kit. The compiler automatically converts the return value into decimals. You will have to convert the value yourself to hex. This can be easily done with the windows calculator, by selecting "View → Programmer" and selecting "Dec", pasting the value in, and then selecting "hex".
Example:
<source lang="papyrus">
Int myFormID = SomeTree.GetFormID
;result...
768339 = BB953; or 000BB953 in the editor.
</source>
</source>



Revision as of 11:44, 27 February 2015

Member of: Form Script

Returns this form's form ID.

Syntax

int Function GetFormID() native

Parameters

None

Return Value

The form ID of this form.

Examples

; Obtains the form id of the main quest
int formID = mainQuest.GetFormID()

Notes

  • Name can be misleading to anyone expecting the return value to be the value for a form found in the Creation Kit. The compiler automatically converts the return value into decimals. You will have to convert the value yourself to hex. This can be easily done with the windows calculator, by selecting "View → Programmer" and selecting "Dec", pasting the value in, and then selecting "hex".

Example:

Int myFormID = SomeTree.GetFormID
;result...
768339 = BB953; or 000BB953 in the editor.

See Also