paulvanderveen1 Posted July 10, 2010 Share Posted July 10, 2010 I'm trying to script a spell that creates a fullactorcopy then targets the copy after it is made. The copy will have its own unique ID, so I'm trying instead to force it to a ref declared at the beginning of the script.Anyone know how to do that, or a better way? This is the current rendition: scn CloneActorref targetref copy begin scripteffectstarttarget.createfullactorcopy copytarget.startcombat copyend begin scripteffectupdateif copy.getdead == 1copy.deletefullactorcopytarget.killendifend Link to comment Share on other sites More sharing options...
Tomlong54210 Posted July 11, 2010 Share Posted July 11, 2010 I do not understand. RefIDs are unique... The RefID refers to an instance of an object. A copy is a new instance, so the RefIDs would be different, wouldn't they? How could you know what RefID the game was going to generate? If you do not know that, how can you hard code such an ID? Link to comment Share on other sites More sharing options...
GODSBANE123456 Posted July 11, 2010 Share Posted July 11, 2010 if you have ever played around in-game with the createfullactorcoppy, then you will realize that when you do so, it uses the next available refid for the copy, usually only 1 number off of the original, and if you make a copy of the copy, then the samething happens, so therefore you will never know what the new refid will be, and unfortuantely, the game doesn't allow for you to be able to create your own new ref id for a target actor... Link to comment Share on other sites More sharing options...
Tomlong54210 Posted July 11, 2010 Share Posted July 11, 2010 if you have ever played around in-game with the createfullactorcoppy, then you will realize that when you do so, it uses the next available refid for the copy, usually only 1 number off of the original, and if you make a copy of the copy, then the samething happens, so therefore you will never know what the new refid will be, and unfortuantely, the game doesn't allow for you to be able to create your own new ref id for a target actor...That's what I thought... Link to comment Share on other sites More sharing options...
Argomirr Posted July 12, 2010 Share Posted July 12, 2010 I haven't really looked at the rest of the script, but if you want to get the new actor's ref, this Set copy to target.createfullactorcopy should work. Link to comment Share on other sites More sharing options...
paulvanderveen1 Posted July 12, 2010 Author Share Posted July 12, 2010 I haven't really looked at the rest of the script, but if you want to get the new actor's ref, this Set copy to target.createfullactorcopy should work. Actually, it worked quite well (I think). The startcombat command was the problem, so i set the aggression to 100 instead. The clones fight each other to the death. Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts