Aller au contenu

Photo

Character Clone


  • Veuillez vous connecter pour répondre
3 réponses à ce sujet

#1
WhiteTiger

WhiteTiger
  • Members
  • 479 messages

I would like to create a character clone like create a copy and add a script OnDamage to destroy object_Self if he got damaged

 

 

Is that possible or is too far?



#2
Proleric

Proleric
  • Members
  • 2 359 messages

Very possible. CopyObject makes an exact copy, including inventory and scripts. You could set a local integer on the clone to cause it to be destroyed OnDamaged. That script will need to be on the original, too, but it will be harmless unless the local flag is set.

 

You can even clone a PC, as in the following example, in which the clone also attacks the PC:

 

Spoiler

 

For an NPC, only the CopyObject line would be necessary, in most cases.


  • Kato - et WhiteTiger aiment ceci

#3
WhiteTiger

WhiteTiger
  • Members
  • 479 messages

I am here just to say that I'll reply it later. Need to study the script you wrote later and doing my tests.

 

Yes, I would clone Player Characters and not NPCs



#4
WhiZard

WhiZard
  • Members
  • 1 204 messages

If you are cloning player characters then you will additionally need to provide them with a script set.  I believe this can be easily accomplished through an NWNX plugin.  However, without a plug-in, the traditional way is to copy the PC, have the PC dominate the copy, make a copy of the copy (the PC dominate script set is an associate script set as well) and destroy the first copy.


  • Proleric et Kato - aiment ceci