Difference between revisions of "Talk:CreateFullActorCopy"

4,309 bytes added ,  14:56, 12 April 2007
Guidobot I hope you don't mind if I delete your last edit as well. revert
imported>Guidobot
imported>Entim
(Guidobot I hope you don't mind if I delete your last edit as well. revert)
Line 3: Line 3:
Also, anyone know a good way to copy over the factions and things that the base has, to create a true duplicate?
Also, anyone know a good way to copy over the factions and things that the base has, to create a true duplicate?


:[[User:ShadowDancer|ShadowDancer]] 10:32, 6 July 2006 (EDT): Well short of writing a script that goes through all of the factions and does a [[GetInFaction]]
:[[User:ShadowDancer|ShadowDancer]] 10:32, 6 July 2006 (EDT): Well short of writing a script that goes through all of the factions and does a [[GetInFaction]] & [[GetFactionRank]]/[[SetFactionRank]] on the CreateActorFullCopy I can't think of an easy way to do it.  Interestingly enough, while the CreateFullActorCopy may not have AI Packages, they do have the combat packages and spells hardcoded into the specified actor.  Leaving out that one tab on the actor is a bit odd if you ask me, though I suppose it had to do with what they thought they were doing when they made the game.  If you need the dialogue, I haven't a clue as to how you would add that onto a copy since I don't see how you could find out the packages that the actor originally had.


:I use this for summons w/ DeleteFullActorCopy and it works like a charm. It creates a new base object so that you can change the name of the reference through this. I believe DeleteFullActorCopy deletes the base object and the instantiated reference. [[User:Guidobot|Guidobot]] 14:52, 12 April 2007 (EDT)
:Additionally, as long as you get a reference variable to the copy, you can pretty much do whatever to the copy without affecting the original from what I found by experimentation with this.  Changing the name doesnt affect the base copy or the original in the game from what I have seen (I created an activator to duplicate an NPC reference though).  Mileage might vary in a spell script since scripts sometimes have odd effects for no apparent reason.  I did a [[SetActorFullName]] and a [[RemoveAllItems]] on the copy with no effects on the original in the same room. It essentially creates a new reference to the base object minus the dialogue and AI functions from what I can tell.  I still have no idea why it wipes those other than possible questing conflicts that the dialogue may cause when talking to two copies of the same actor.
<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>
 
::Design decision I suppose. When the copy has to be independent from the base (which is a very good thing) You either need a flag that determines whether to use the base or not and check for this flag in each command that modifies the base, or you simply create a copy that isn't linked to the base. [[GetIsID]] tests for the ID of the base-object and when the base object isn't the same, the dialogue won't apply.--[[User:JOG|JOG]] 12:40, 6 July 2006 (EDT)
 
:::[[User:ShadowDancer|ShadowDancer]] 12:53, 6 July 2006 (EDT): Pretty much what I figured towards the end.  Although then the question becomes why bother to make a way to copy an actor in the first place?  Still, I hope that what I found out is of some use to [[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>]].
 
::::I'd say mainly for the Skull of Corruption. Also we now have the posibility to make scripted cutscenes that involve the player...--[[User:JOG|JOG]] 13:00, 6 July 2006 (EDT)
 
:::::[[User:ShadowDancer|ShadowDancer]] 13:15, 6 July 2006 (EDT): OK, I would say that that is a good point about the Skull of Corruption.  I don't know much about cut scenes so that thought never occured to me, although now that you mention it, it makes perfect sense.  In fact, I never really thought much on how to produce a cut scene.  Hmmm... so that is where you would use a look command I imagine...  Now I have something else to work on LOL!
 
::::::[[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>]] 15:13, 6 July 2006 (EDT): Thanks guys for looking into that for me. I've been scripting without Oblivion for a few days, and I'd written a few thousand lines before I read that SetActorFullName effects the object instead of the reference, and I kind of paniced. Nice to know that I can work around it... though it'll be a major headache, now. Thank you very much.
 
::::::The possibility for cutscenes is intriguing. Cool idea.
 
----
[[User:GuidoBot|GuidoBot]] 17:02, 12 October 2006 (EDT) One reason to use CreateFullActor copy is so you can delete them later. This is a way around the (3-day) persistance created with PlaceAtMe <actorOID>.
 
Another related note is that although you can make a copy of the player this way, for the sake of saving stats for example, DuplicateNPCStats does not work for copying them back to the player at some later date. (Not that the command name implies that you ever could.)
Anonymous user