Difference between revisions of "GetName - Form"
Jump to navigation
Jump to search
imported>Tania (Added F4SE member page for GetName.) |
imported>Qazaaq (removed incomplete) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
'''F4SE member of:''' [[Form Script]] | '''F4SE member of:''' [[Form Script]] | ||
{{Template:Papyrus:RequiredF4SE|version=0.3.1}} | |||
Gets the name of the form, full name if possible | Gets the name of the form, full name if possible. | ||
== Syntax == | == Syntax == | ||
Line 20: | Line 17: | ||
<source lang="papyrus"> | <source lang="papyrus"> | ||
; If you want to know the name of player's current cell. | ; If you want to know the name of player's current cell. | ||
string cellName = Game.GetPlayer().GetParentCell().GetName() | |||
Debug.Trace("My parent cell's name is: " + cellName) | |||
; If you want to know an actor's name. | ; If you want to know an actor's name. | ||
PrestonRef.GetActorBase().GetName() | string prestonName = PrestonRef.GetActorBase().GetName() | ||
Debug.Trace(prestonName + " says hello.") | |||
</source> | </source> | ||
Line 33: | Line 31: | ||
== See Also == | == See Also == | ||
[[Form Script]] | [[Form Script]] | ||
[[Category:Scripting]] | |||
[[Category:Papyrus]] | |||
[[Category:F4SE]] |
Latest revision as of 14:35, 21 January 2018
F4SE member of: Form Script
Requires F4SE version 0.3.1 or higher.
Gets the name of the form, full name if possible.
Syntax[edit | edit source]
string Function GetName() Native
Parameters[edit | edit source]
None
Return Value[edit | edit source]
The name of the form as a string.
Examples[edit | edit source]
; If you want to know the name of player's current cell.
string cellName = Game.GetPlayer().GetParentCell().GetName()
Debug.Trace("My parent cell's name is: " + cellName)
; If you want to know an actor's name.
string prestonName = PrestonRef.GetActorBase().GetName()
Debug.Trace(prestonName + " says hello.")
Notes[edit | edit source]
- For actors and object references, must be used on the base object.
- The return value is the name found under the name column for objects in the editor.