SetName - Form

Revision as of 03:03, 1 September 2012 by imported>JustinOther (Argument misnamed. 'k' denotes a Form/Alias, BTW. If going by Beth's argument nomenclature, it would be asName, Added a note about maintaining the edits.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

SKSE Member of: Form Script

Sets the name of the form. (This function requires SKSE)

SyntaxEdit

Function SetName(String Name) native

ParametersEdit

  • Name: the new name for this form.

Return ValueEdit

  • none

ExamplesEdit

; Set Bob's name to be Bobinsky
BobReference.GetBaseObject().SetName("Bobinsky")
; My name's now Bobinsky!


; Set the Bob's name to be Bob + player's name (here, player is named Bobby
BobReference.GetBaseObject().SetName("Bob "+Game.GetPlayer().GetBaseObject().GetName())
; Bob is now named Bob Bobby!
endif


; Set the form's name to be Sam, through a Reference Alias.
VillagerAlias.GetReference().GetBaseObject().SetName("Sam")

NotesEdit

  • This function does not work on actors or object references, use the actor base or base object instead.
  • This will affect all instances of the passed form. It's better to be used on a unique actor.
  • Name changes will not be saved and must be maintained via a maintenance setup or something similar.

See AlsoEdit