DarkPredator Posted January 8, 2007 Share Posted January 8, 2007 Hey Guys, i wanted to make a little Fight Talk Fight Sequenze with Mission after the event on the Temple roof and returnig back as Darth Revan, but somehow it doesn't want to work I made all Scripts like describend in tk102 Talk-Fight-Talk Thread and changend the 2 entries in her .utc file (OnSpawn and OnUserDefine) but nothing happens when she reaches 1 HP, expecting that she continues fighting -_-" I put the script which makes her attack in the unk41_mission.dlg, it looks like this: mat void main() { object oNPC = GetObjectByTag("Mission"); SetMinOneHP(oNPC, TRUE); ChangeToStandardFaction(oNPC, 1); }[/Quote] And the ohter in her normal talkfile, k_hmis_dialog.dlg. I put it on the first Position with this Script as Condition: mstop int StartingConditional() { int nResumeTalk = GetLocalBoolean(OBJECT_SELF,0); return nResumeTalk; }[/Quote] Is this maybe a Problem that i use 2 differnt dlg files for this? Or maybe that the changes in the .utc files dont affect her somehow because seh's created already with the other files or somthing like that? Or do i have to use another Script as Condition for the resumetalk part? Dont think its nessecary to post the other scripts, like i side i made them like tk102 describes them here: tk102's Thread Link to comment Share on other sites More sharing options...
stoffe Posted January 8, 2007 Share Posted January 8, 2007 I made all Scripts like describend in tk102 Talk-Fight-Talk Thread and changend the 2 entries in her .utc file (OnSpawn and OnUserDefine) but nothing happens when she reaches 1 HP, expecting that she continues fighting -_-" Sounds like the Health check script isn't properly detecting when she's near death. Post the OnDamaged event script that you are using here and perhaps someone can spot what's wrong. Link to comment Share on other sites More sharing options...
DarkPredator Posted January 8, 2007 Author Share Posted January 8, 2007 ok °_° mapo #include "k_inc_generic" #include "k_inc_utility" void main() { int nCurrentHP; int nUser = GetUserDefinedEventNumber(); if(nUser == 1006) // DAMAGED { nCurrentHP=GetCurrentHitPoints(); if (nCurrentHP<10) { CancelCombat (OBJECT_SELF); ClearAllActions(); ChangeToStandardFaction(OBJECT_SELF, 5); object oNPC = GetObjectByTag("Zaalbar"); ChangeToStandardFaction(oNPC, 5); //record that we have fought SetLocalBoolean(OBJECT_SELF,0,TRUE); //Turn off the imortality SetMinOneHP(OBJECT_SELF,FALSE); object oPC=GetFirstPC(); ActionStartConversation(oPC); } } } mpre #include "k_inc_generic" void main() { //This will make our user-defined event fire GN_SetSpawnInCondition(SW_FLAG_EVENT_ON_DAMAGED); GN_SetDayNightPresence( AMBIENT_PRESENCE_ALWAYS_PRESENT); GN_SetListeningPatterns(); GN_WalkWayPoints(); } Link to comment Share on other sites More sharing options...
stoffe Posted January 9, 2007 Share Posted January 9, 2007 I can't spot anything that looks wrong in those scripts in themselves, so perhaps the problem lies in how they are used? Some other things to check: What character are you using the scripts with? The party-member mission or a separate NPC version of Mission? Have you remembered to recompile your modified OnSpawn and OnUserDefined event scripts, and put the resulting NCS files in the override folder? Double check the names of your new scripts in the UTC template to verify that you've set them correctly in the OnUserDefined and OnSpawn event slots. Also make sure the names of your new scripts are valid ResRefs (max 16 alphanumerical characters and underscores). Check what scripts are assigned to the other AI event slots of the character. If it's not the standard AI scripts it's possible that the signaling of user defined events in them might have been removed. Link to comment Share on other sites More sharing options...
DarkPredator Posted January 9, 2007 Author Share Posted January 9, 2007 What character are you using the scripts with? The party-member mission or a separate NPC version of Mission? The Party Member, because she wears the Equipment i gaved her. So i was sure its he Party Member one, but maybe i'm wrong? Have you remembered to recompile your modified OnSpawn and OnUserDefined event scripts, and put the resulting NCS files in the override folder? Yes, i also thaught this could be the Problem, but after recompiling them for about 5 times i gaved up on this idea and yes they're defintily in the Override Folder Double check the names of your new scripts in the UTC template to verify that you've set them correctly in the OnUserDefined and OnSpawn event slots. Also make sure the names of your new scripts are valid ResRefs (max 16 alphanumerical characters and underscores). Check what scripts are assigned to the other AI event slots of the character. If it's not the standard AI scripts it's possible that the signaling of user defined events in them might have been removed. Here i made a Screenshot of the Scripts in her .utc and i immediatly edit my first 2 posts and wirte the Scriptnames above them so you can see if i run a false script °°" Link to comment Share on other sites More sharing options...
stoffe Posted January 9, 2007 Share Posted January 9, 2007 The Party Member, because she wears the Equipment i gaved her. So i was sure its he Party Member one, but maybe i'm wrong? In that case you may need to add in conditional checks to ensure that the HP check only is done at the proper place in the story. Otherwise that part would trigger any time Mission is knocked below 10 health during the entire game. Also, keep in mind that changes to UTC templates only take effect before that character first is spawned into the game. After that their info is stored in the savegame instead and any changes to the UTC file will not be reflected in the game. This means that unless Mission joined the party (on Taris) after you modified p_mission.utc she will still have her old scripts (or no scripts in this case) assigned in-game. Link to comment Share on other sites More sharing options...
DarkPredator Posted January 9, 2007 Author Share Posted January 9, 2007 In that case you may need to add in conditional checks to ensure that the HP check only is done at the proper place in the story. Otherwise that part would trigger any time Mission is knocked below 10 health during the entire game. Yeah i thought of that, i hoped it could be possible to change the .utc file trough a script, but thats nonsense when i think about it Also, keep in mind that changes to UTC templates only take effect before that character first is spawned into the game. After that their info is stored in the savegame instead and any changes to the UTC file will not be reflected in the game. This means that unless Mission joined the party (on Taris) after you modified p_mission.utc she will still have her old scripts (or no scripts in this case) assigned in-game. So this is the Problem then, i tested it with a savegame where she was already created. But ok, then I need another solution like replace the Partymember Mission for that sequence with a new one and destroy her after the conversation again and spawn the Partymember mission Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.