Malxados Posted February 10, 2009 Share Posted February 10, 2009 I was wondering if/how you can kill someone using script attached to dialog (or any easier way) (example: Bob has been injured in a recent fight. When you talk to him, he will ask you to tell his wife he loved her. As soon as he's finished asking, he dies) Malxados Link to comment Share on other sites More sharing options...
Star Admiral Posted February 10, 2009 Share Posted February 10, 2009 Yes, you can. Use the DestroyObject() function. It would look something like this. void main() { object oKill = GetObjectByTag( "persontokill" ); AssignCommand( oKill, ClearAllActions() ); SetCommandable( FALSE, oKill ); DestroyObject( oKill, 1.00 ); } "persontokill" should be replaced with the tag of the creature in question. The 1.00 in DestroyObject() is a delay before deletion, so that the creature doesn't immediately disappear. You should use this script only at the very end of the dialog, else bad things might happen. - Star Admiral Link to comment Share on other sites More sharing options...
Malxados Posted February 10, 2009 Author Share Posted February 10, 2009 Thanks Star Admiral for the fast reply. Would his body still be in the ground as normal, or would it disappear. (Example: would I have to make a script to have Bob give me a note for his wife, or would I be able to put the note in his inventory and take it from his dead body?) Link to comment Share on other sites More sharing options...
Star Admiral Posted February 10, 2009 Share Posted February 10, 2009 His body would fade away, so if you want to him to give a note, it will have to be by scripting. - Star Admiral Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.