PC Clone - OnDeath event?
#1
Posté 14 février 2012 - 01:41
In the event that no script is fired, which seems likely, any suggestions on a reliable way to test for the death? I thought of triggering a pseudo-hb when the clone is spawned that checks for the presence of the creature with the appropriate tag, but looking for other options. The creature lives in one area (i.e. does not transition from that area). Estimated lifespan of the creature is probably less than an hour.
Thanks!
#2
Posté 14 février 2012 - 01:43
Modifié par ShaDoOoW, 14 février 2012 - 01:44 .
#3
Posté 14 février 2012 - 02:32
BelowTheBelt wrote...
I have a part of my module that clones the PC. In the event that the clone dies, I need to trigger an event and I'm having trouble finding what script, if any, is called in the OnDeath of the clone. It doesn't appear to be the normal monster ondeath scripts nor the henchman ondeath script. Does anyone know?
In the event that no script is fired, which seems likely, any suggestions on a reliable way to test for the death? I thought of triggering a pseudo-hb when the clone is spawned that checks for the presence of the creature with the appropriate tag, but looking for other options. The creature lives in one area (i.e. does not transition from that area). Estimated lifespan of the creature is probably less than an hour.
Thanks!
IIRC clones come without a script set. But you can give them a standard script set by making a clone, giving it a control loss status (e.g. confuse, dominate), and cloning the clone, and destroying the first clone.
#4
Posté 14 février 2012 - 07:02
Interesting idea, WhiZard...I'll have to look into that.
#5
Posté 14 février 2012 - 07:09
Do you have to remove the domination effect before the second clone is made or, if the 2nd clone is made, do you have to remove the domination effect from it (i.e. does the domination effect carry over to the second clone from the copy of the first clone?).
#6
Posté 14 février 2012 - 07:12
I don't think it carries over.
Try just making a copy of the dominated copy.
Are you having a problem getting it to work?
Modifié par wyldhunt1, 14 février 2012 - 07:13 .
#7
Posté 14 février 2012 - 07:16
#8
Posté 14 février 2012 - 07:18
http://nwvault.ign.c....detail&id=2876
That may save you some time.
Modifié par wyldhunt1, 14 février 2012 - 07:19 .
#9
Posté 15 février 2012 - 04:26
Serendipitiously, almost immediately after I wrote the script, I saw the command in the NWNx_funcs plugin that enables you to set each key event with a script (via the SetScriptEvent command, I think), eliminating my need to create the second copy at all. Now, I only need to copy the pc and then set the right script set (the scripts I really need to use are custom, so setting them directly also obviates my need to include a call from the default scripts to my custom ones).
I've tested the NWNx version and it appears to work, though testing is not fully complete. Once again, NWNx FTW!
Thanks a lot for the suggestions - it was exactly what I needed.
Modifié par BelowTheBelt, 15 février 2012 - 04:56 .





Retour en haut







