Jump to content

Actor ReferenceID


Recommended Posts

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 CloneActor

ref target

ref copy

 

begin scripteffectstart

target.createfullactorcopy copy

target.startcombat copy

end

 

begin scripteffectupdate

if copy.getdead == 1

copy.deletefullactorcopy

target.kill

endif

end

Link to comment
Share on other sites

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

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

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

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...