Tomb King Posted March 23, 2005 Share Posted March 23, 2005 On .utc files in the scripts does the OnDeath script mean when that npc dies that the OnDeath script is activated? Link to comment Share on other sites More sharing options...
Xcom Posted March 23, 2005 Share Posted March 23, 2005 Uh.. yes. Link to comment Share on other sites More sharing options...
Tomb King Posted March 23, 2005 Author Share Posted March 23, 2005 I mean that when the npc is killed is the script in the OnDeath field is activated? Link to comment Share on other sites More sharing options...
tk102 Posted March 23, 2005 Share Posted March 23, 2005 Yes. See also http://www.lucasforums.com/showthread.php?s=&threadid=143452 Link to comment Share on other sites More sharing options...
Darth333 Posted March 23, 2005 Share Posted March 23, 2005 I used it in the tk102 birthday mod. Here is an example of what I did (you'll find the files in the d3_czerka.mod module if you want to look at them). The d3_keyb.utc has the following ScriptSpawn: #include "k_inc_generic" #include "k_inc_debug" void main() { GN_SetSpawnInCondition(SW_FLAG_EVENT_ON_DEATH); //OPTIONAL BEHAVIOR - Fire User Defined Event 1007 GN_SetDayNightPresence (AMBIENT_PRESENCE_ALWAYS_PRESENT); GN_SetListeningPatterns(); GN_WalkWayPoints(); } and then in the ScriptUserDefine field I attached the actions to be performed when the npc dies - in this case give an access pass to the PC: void main() { int nUser = GetUserDefinedEventNumber(); if (nUser != 1007) return; object oPC = GetPCSpeaker(); CreateItemOnObject("d3_access", oPC); } Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.