Difference between revisions of "SetName - Form"

From the Fallout4 CreationKit Wiki
Jump to navigation Jump to search
imported>Tania
(Added F4SE member page SetName.)
 
imported>Qazaaq
m (style)
Line 9: Line 9:
== Syntax ==
== Syntax ==
<source lang="papyrus">
<source lang="papyrus">
Function SetName(String name) Native
Function SetName(string name) Native
</source>
</source>


== Parameters ==
== Parameters ==
Name: New name of this form.
* 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()
string ObjName = FirstObj.GetName()
SecondObj.SetName(ObjName)
SecondObj.SetName(ObjName)
</source>
</source>

Revision as of 20:07, 12 October 2017


F4SE member of: Form Script

Sets the name of the form to the passed in string. Requires F4SE 0.03.1.

Syntax

Function SetName(string name) Native

Parameters

  • name: The new name of this form.

Return Value

None

Examples

; Get the name of an object and change another object's name to that one.
string ObjName = FirstObj.GetName()
SecondObj.SetName(ObjName)

Notes

  • 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.

See Also