Difference between revisions of "SetName - Form"
Jump to navigation
Jump to search
imported>Tania (Added F4SE member page SetName.) |
imported>Qazaaq (added required f4se version) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
'''F4SE member of:''' [[Form Script]] | '''F4SE member of:''' [[Form Script]] | ||
{{Template:Papyrus:RequiredF4SE|version=0.3.1}} | |||
Sets the name of the form to the passed in string | Sets the name of the form to the passed in string. | ||
== Syntax == | == Syntax == | ||
<source lang="papyrus"> | <source lang="papyrus"> | ||
Function SetName( | Function SetName(string name) Native | ||
</source> | </source> | ||
== Parameters == | == Parameters == | ||
* name: The new name of this form. | |||
== Return Value == | == Return Value == | ||
None | None | ||
== Examples == | == Examples == | ||
<source lang="papyrus"> | <source lang="papyrus"> | ||
; Get the name of an object and change another object's name to that one. | ; Get the name of an object and change another object's name to that one. | ||
string ObjName = FirstObj.GetName() | |||
SecondObj.SetName(ObjName) | SecondObj.SetName(ObjName) | ||
</source> | </source> | ||
Line 33: | Line 30: | ||
*[[Form Script]] | *[[Form Script]] | ||
*[[GetName - Form]] | *[[GetName - Form]] | ||
[[Category:Scripting]] | |||
[[Category:Papyrus]] | |||
[[Category:F4SE]] |
Latest revision as of 14:45, 21 January 2018
F4SE member of: Form Script
Requires F4SE version 0.3.1 or higher.
Sets the name of the form to the passed in string.
Syntax[edit | edit source]
Function SetName(string name) Native
Parameters[edit | edit source]
- name: The new name of this form.
Return Value[edit | edit source]
None
Examples[edit | edit source]
; Get the name of an object and change another object's name to that one.
string ObjName = FirstObj.GetName()
SecondObj.SetName(ObjName)
Notes[edit | edit source]
- For actors and object references, must be used on the base object.
- If calling on an actor, use a unique one.
- May affect all instances of the form.