I have a creature (NPC) that I want removed (which I think is best done by switching the creatures active flag to false) after I run a script.
Does anyone know the command to change the "Active" flag to false?
Thanks.
using a script to make a creature inactive?
Débuté par
Prince of Thieves
, mars 06 2010 10:38
#1
Posté 06 mars 2010 - 10:38
#2
Posté 06 mars 2010 - 11:33
SetObjectActive(oCreature,FALSE);
oCreature being your creature object.
Do you know the filter in the script editor to search for specific functions/constants etc.? That's really helpful.
There's also UT_ExitDestroy() and the plot flag GEN_EXIT_DESTROY which might be handy, depending on what you want to have exactly. They move the creature first, the plot flag can be called from a conversation as well.
oCreature being your creature object.
Do you know the filter in the script editor to search for specific functions/constants etc.? That's really helpful.
There's also UT_ExitDestroy() and the plot flag GEN_EXIT_DESTROY which might be handy, depending on what you want to have exactly. They move the creature first, the plot flag can be called from a conversation as well.
#3
Posté 07 mars 2010 - 12:50
Thank you Magic.
#4
Posté 07 mars 2010 - 04:18
Aren't you supposed to use Safe_Destroy instead? I vaguely remember reading some warning in the toolkit about a Destroy command.
#5
Posté 07 mars 2010 - 10:10
Safe_Destroy_Object() should be used instead of DestroyObject() to make sure no critical object gets deleted by accident. If you're taking care of this yourself, both is okay since Safe_Destroy_Object() calls DestroyObject() anyway. SetObjectActive() is even "safer" though because the object stays reusable.





Retour en haut






