Difference between revisions of "Talk:SetActorFullName"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>DragoonWraith
m (typo)
imported>ShadowDancer
(added script to discussion since it seems to contradict the article?)
 
(2 intermediate revisions by 2 users not shown)
Line 11: Line 11:
::::: As far as I know there's no way to get the name of anything, limiting the functionality of the set-name functions.—[[User:Mmmpld|mmmpld]] 00:05, 1 June 2006 (EDT)
::::: As far as I know there's no way to get the name of anything, limiting the functionality of the set-name functions.—[[User:Mmmpld|mmmpld]] 00:05, 1 June 2006 (EDT)
----
----
[[User:DragoonWraith|<font face="Oblivion,Daedric" size=3>D</font>ragoon <font face="Oblivion,Daedric" size=3>W</font>raith]] [[User_talk:DragoonWraith|<font face="Oblivion,Daedric" size=2>TALK</font>]] 12:48, 5 July 2006 (EDT): OK, I want to use this to rename generic actors, but this will change the Object's name, rather than the reference's (argh). Can I use [[CreateFullActorCopy]] with this to avoid changing all the References of an Object?
[[User:DragoonWraith|<font face="Oblivion,Daedric" size=3>D</font>ragoon <font face="Oblivion,Daedric" size=3>W</font>raith]] [[User_talk:DragoonWraith|<font face="Oblivion,Daedric" size=2>TALK</font>]] 12:48, 5 July 2006 (EDT): OK, I want to use this to rename generic actors, but this will change the Object's name, rather than the Reference's (argh). Can I use [[CreateFullActorCopy]] with this to avoid changing all the References of an Object?
 
:[[User:ShadowDancer|ShadowDancer]] 11:33, 6 July 2006 (EDT): If you create an in-game copy through a script of an NPC, you can change the name of that copy as long as you have the reference to the copy.  See [[Talk:CreateFullActorCopy]]
<pre>
ScriptName Duplicate
 
Ref ActorRef
Ref DoOnce
Float Timer
 
Begin OnActivate
  If IsActionRef Player == 1
      Set ActorRef to PriorMaborelRef.CreateFullActorCopy  ;Creates actor copy
  EndIf
End
 
Begin GameMode
  If Timer >= 10 && DoOnce == 0
      ActorRef.RemoveAllItems                    ;Removes items only on copy
      ActorRef.SetActorFullName "Idiot Savant"  ;Changes name only on copy
      Set DoOnce to 1
  Else
      Set Timer to Timer + GetSecondsPassed
  EndIf
End
</pre>

Latest revision as of 10:45, 6 July 2006

Dragoon Wraith TALK 12:27, 30 May 2006 (EDT): I don't suppose this works on non-actors? Doesn't really make sense that it shouldn't, except that its name implies that it doesn't...

Just tested it on several activators, containers and items: doesn't work.--JOG 13:34, 30 May 2006 (EDT)
Dragoon Wraith TALK 14:14, 30 May 2006 (EDT): *sigh* Yeah, unsurprised. Makes little sense, but what does in the world of TES scripting?
Well, if you wanted to have a non-actor change names, you could make it so the first version of the object is replaced by the second version at the exact same location (First disabled, second enabled vs. First enabled, second disabled), if that's any help. TheImperialDragon 16:19, 30 May 2006 (EDT)
Dragoon Wraith TALK 20:24, 30 May 2006 (EDT): The actual hope was to use the player's name as part of the item, using this function. It's OK, I didn't really have anything in mind for it, I just wanted to see if it was possible, and didn't have my copy of Oblivion to test it on.
As far as I know there's no way to get the name of anything, limiting the functionality of the set-name functions.—mmmpld 00:05, 1 June 2006 (EDT)

Dragoon Wraith TALK 12:48, 5 July 2006 (EDT): OK, I want to use this to rename generic actors, but this will change the Object's name, rather than the Reference's (argh). Can I use CreateFullActorCopy with this to avoid changing all the References of an Object?

ShadowDancer 11:33, 6 July 2006 (EDT): If you create an in-game copy through a script of an NPC, you can change the name of that copy as long as you have the reference to the copy. See Talk:CreateFullActorCopy
ScriptName Duplicate

Ref ActorRef
Ref DoOnce
Float Timer

Begin OnActivate
   If IsActionRef Player == 1
      Set ActorRef to PriorMaborelRef.CreateFullActorCopy   ;Creates actor copy
   EndIf
End

Begin GameMode
   If Timer >= 10 && DoOnce == 0
      ActorRef.RemoveAllItems                    ;Removes items only on copy
      ActorRef.SetActorFullName "Idiot Savant"   ;Changes name only on copy
      Set DoOnce to 1
   Else
      Set Timer to Timer + GetSecondsPassed
   EndIf
End