zinervadonella Posted October 23, 2005 Share Posted October 23, 2005 I've a talk fight talk sequence in a mod I'm working on and it works perfectly as long as the pc or pnpc only use combat. If the pc or a pnpc uses a force power on the target npc and that force power does enough damage to bring the target's hit points to zero the target dies. I've set Min1HP to 1 in the .utc file and I'm using the scripts found in the talk fight talk tutorial here. How do I keep the force from killing the target? Thanks. Link to comment Share on other sites More sharing options...
Darth333 Posted October 23, 2005 Share Posted October 23, 2005 Are you sure the change is well saved in the .utc? Or you could simply use a script attached somehwere before the fight occurs: void main() { SetMinOneHP(GetObjectByTag("my_object_tag"),TRUE); } Link to comment Share on other sites More sharing options...
Det. Bart Lasiter Posted October 23, 2005 Share Posted October 23, 2005 You could also try just applying the effect as well: object oTarget = GetObjectByTag("/*tag*/"); ApplyEffectToObject(1, EffectBeam(/*beam parameters*/), oTarget, /*floating-point duration*/); That way no damage is ever inflicted Link to comment Share on other sites More sharing options...
zinervadonella Posted October 24, 2005 Author Share Posted October 24, 2005 Are you sure the change is well saved in the .utc? Positive. Like I said it works perfectly with combat, the target is immortal. When I open the .utc in kgff.exe it says in the min1hp line: Min1HP [Type: Byte] Value:1. It's just when a party member hits the target with a force power that does enough damage to bring the targets hit points below zero the target dies. I'll try the script and see if that works. thanks p.s. The script didn't work. Any ideas anyone? Link to comment Share on other sites More sharing options...
zinervadonella Posted October 24, 2005 Author Share Posted October 24, 2005 That way no damage is ever inflicted That would defeat the purpose of the talk fight talk sequence. The second dialog happens because the target is beaten into submission in Jedi vs. Sith combat. Light sabers and force powers. thanks. Link to comment Share on other sites More sharing options...
Det. Bart Lasiter Posted October 24, 2005 Share Posted October 24, 2005 Should the Min1HP property not work though, that would work and you could still kill the loser of the fight as well with something like: void main() { /* code... */ if (GetCurrentHitPoints(/*object reference*/) == 1) // You can use this to know when to trigger something { ApplyEffectToObject(0, EffectDeath(), /*object reference*/); } /* more code... */ } Link to comment Share on other sites More sharing options...
zinervadonella Posted October 24, 2005 Author Share Posted October 24, 2005 After much experimenting I have determined that the problem has nothing to do with the min1hp setting as if I use the default user define script and spawn script the target becomes immortal. the spawn script is: #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(); } the user define script is: #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); //record that we have fought SetLocalBoolean(OBJECT_SELF,0,TRUE); //Turn off the imortality SetMinOneHP(OBJECT_SELF,FALSE); object oPC=GetFirstPC(); ActionDoCommand(ActionStartConversation(oPC)); } } } I don't know enough about aurora or oddessy scripting to know what is missing from these scripts. Anyone? thanks. Link to comment Share on other sites More sharing options...
kdsphantom Posted October 25, 2005 Share Posted October 25, 2005 Hiya zinervadonella I just made a mod "phantoms happy halloween mod" I know shameless plug, in it I have 3 zones during making it I learned a bit, the first zone I had a talk fight talk issue just like you describe. Im not sure if I'll be able to help much but I hope to. I was having the same sort of problem in that my party members were killing the guy I was talking to in the talk fight talk fight script. Which it seems your trying to solve same as I was. In my mod, that was in the first part and I was, well I felt running low on time and I just left it and moved on but kept thinking and reading about it, knowing I was going to go back and fix it to make it right. Which looks exactly where you are at. As for your script, wow that is pretty, its alot better then I came up with, and honestly gives me more ideas to use but one thing I was always going to put back into mine was a heal command for the guy, so when we fought again he wasnt as 1 hp or 5 or whatever he was at when we started the 2nd conversation, before dropping his "immortality shield" why not heal him. Like right after the local Boolean goes off? and then what about a 2 second delay ? again before the immortaily shield comes off? well I hope that helps and again if it does it will really help me to solve the same problem I have as well. (If you like PM me and I can send you my source material I used but from seeing your script heh yours looks better then mine.) kdsphantom Link to comment Share on other sites More sharing options...
zinervadonella Posted October 25, 2005 Author Share Posted October 25, 2005 ... but from seeing your script heh yours looks better then mine. kdsphantom Mine comes from the tutorial in the tutorial section. I'm just not sure if I'm doing it right. Link to comment Share on other sites More sharing options...
kdsphantom Posted October 25, 2005 Share Posted October 25, 2005 hiya zinervadonella hehe thats where I got mine from, and yours still looks better then mine, Did you try the delay and heal effects? and did they help any? but it looks like your doing it right, how does it work out when you playtest it? The creature in question still sometimes get killed earlier then you like? kdsphantom Link to comment Share on other sites More sharing options...
zinervadonella Posted October 26, 2005 Author Share Posted October 26, 2005 hiya zinervadonella how does it work out when you playtest it? The creature in question still sometimes get killed earlier then you like? kdsphantom yep. Haven't tried the effects yet, no time at the moment. will try soon. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.