Ferc Kast Posted July 24, 2008 Share Posted July 24, 2008 I was setting up a cutscene when I had a question that I couldn't answer. My question is: Can a sealed door be scripted open like a normal door? I already know how to script open a door; I just wanted to verify before I tried it out. Link to comment Share on other sites More sharing options...
ChAiNz.2da Posted July 24, 2008 Share Posted July 24, 2008 If it's an actual "door" (not just a skinned wall) then yes I used a script to open the sealed Medical doors in my Kreia Robes mod Link to comment Share on other sites More sharing options...
EnderWiggin Posted July 24, 2008 Share Posted July 24, 2008 D3's whereami armband opens any door you'd like - that's just a script attached to the item. _EW_ Link to comment Share on other sites More sharing options...
Ferc Kast Posted July 25, 2008 Author Share Posted July 25, 2008 Thanks for answering that question. That got me started with everything else in my cutscene. However, now that I've gotten most of my cutscene's scripts made & working, I have another question. Where I have multiple friendlies & multiple hostiles fighting each other, is there a way so that a specific friendly fights only a specific hostile? Link to comment Share on other sites More sharing options...
Istorian Posted July 25, 2008 Share Posted July 25, 2008 Yeah, with a script: void main () { object oNPC = GetObjectByTag([color="Lime"]"YOUR_TAG_HERE"[/color]); object oOPP = GetObjectByTag([color="Lime"]"YOUR_TAG_HERE"[/color]); ChangeToStandardFaction(oNPC, STANDARD_FACTION_PREY); ChangeToStandardFaction(oOPP, STANDARD_FACTION_PREDATOR); ExecuteScript("k_ai_master", oOPP, 1005); } I tried it to see if it works, and it works for me! Link to comment Share on other sites More sharing options...
Ferc Kast Posted July 25, 2008 Author Share Posted July 25, 2008 I tried it to see if it works, and it works for me! That worked; But, since I set my utcs to minimum 1 hp, they only fight for a few seconds. Is there a way to keep them fighting infinitely? Link to comment Share on other sites More sharing options...
EnderWiggin Posted July 25, 2008 Share Posted July 25, 2008 Are you saying that once they reach 1hp they stop attacking? How long is infinitely? I know that's a self-explanatory question, but is it really necessary to be continuous? You could always pump up their defense and their hp if that's the case. _EW_ Link to comment Share on other sites More sharing options...
Ferc Kast Posted July 25, 2008 Author Share Posted July 25, 2008 Are you saying that once they reach 1hp they stop attacking? How long is infinitely? I know that's a self-explanatory question, but is it really necessary to be continuous? You could always pump up their defense and their hp if that's the case. _EW_ After a few seconds, they stop fighting. But, I want them to keep fighting until and unless I tell to stop. I'd prefer it to continuous b/c i'm gonna have cameras showing each jedi/sith pair fighting. And, I dunno how long I'll want to show them fighting. Link to comment Share on other sites More sharing options...
Istorian Posted July 25, 2008 Share Posted July 25, 2008 I think there is....Uncheck the minimum 1 hp of your utcs, and use this script: void main () { object oNPC = GetObjectByTag("YOUR_TAG_HERE"); object oOPP = GetObjectByTag("YOUR_TAG_HERE"); ChangeToStandardFaction(oNPC, STANDARD_FACTION_PREY); ChangeToStandardFaction(oOPP, STANDARD_FACTION_PREDATOR); ExecuteScript("k_ai_master", oOPP, 1005); int nCurrentHP1; nCurrentHP1=GetCurrentHitPoints(oNPC); if (nCurrentHP<=40) { effect EffectHeal(200); } int nCurrentHP2; nCurrentHP2=GetCurrentHitPoints(oOPP); if (nCurrentHP<=40) { effect EffectHeal(200); } } Haven't tested this one, though.... Link to comment Share on other sites More sharing options...
Ferc Kast Posted July 25, 2008 Author Share Posted July 25, 2008 I'm getting the following error message when I try to compile that script: Looking at it, those lines are the effect heal lines. Link to comment Share on other sites More sharing options...
EnderWiggin Posted July 25, 2008 Share Posted July 25, 2008 I'm getting the following error message when I try to compile that script: Looking at it, those lines are the effect heal lines. Try removing the "(200)" afterward on each one. I think it might be because the heal effect doesn't take a parameter like that. _EW_ Link to comment Share on other sites More sharing options...
Istorian Posted July 25, 2008 Share Posted July 25, 2008 Try removing the "(200)" afterward on each one. I think it might be because the heal effect doesn't take a parameter like that. _EW_ When I do that, I have a syntax error at the if: void main () { object oNPC = GetObjectByTag("YOUR_TAG_HERE"); object oOPP = GetObjectByTag("YOUR_TAG_HERE"); ChangeToStandardFaction(oNPC, STANDARD_FACTION_PREY); ChangeToStandardFaction(oOPP, STANDARD_FACTION_PREDATOR); ExecuteScript("k_ai_master", oOPP, 1005); int nCurrentHP1; nCurrentHP1=GetCurrentHitPoints(oNPC); if (nCurrentHP<=40) { effect EffectHeal; } int nCurrentHP2; nCurrentHP2=GetCurrentHitPoints(oOPP); [color="Lime"]if [/color](nCurrentHP<=40) { effect EffectHeal; } } At the green-colored if Link to comment Share on other sites More sharing options...
EnderWiggin Posted July 25, 2008 Share Posted July 25, 2008 When I do that, I have a syntax error at the if: void main () { object oNPC = GetObjectByTag("YOUR_TAG_HERE"); object oOPP = GetObjectByTag("YOUR_TAG_HERE"); ChangeToStandardFaction(oNPC, STANDARD_FACTION_PREY); ChangeToStandardFaction(oOPP, STANDARD_FACTION_PREDATOR); ExecuteScript("k_ai_master", oOPP, 1005); int nCurrentHP1; nCurrentHP1=GetCurrentHitPoints(oNPC); if (nCurrentHP<=40) { effect EffectHeal; } int nCurrentHP2; nCurrentHP2=GetCurrentHitPoints(oOPP); [color="Lime"]if [/color](nCurrentHP[b]2[/b]<=40) { effect EffectHeal; } } At the green-colored if Your second if checks a variable that doesn't exist. Add a "2" after that (as I've shown) to refer to the right thing and it should work _EW_ Link to comment Share on other sites More sharing options...
Exile007 Posted July 25, 2008 Share Posted July 25, 2008 If I may add, it doesn't look like the NPC's will actually be doing any healing, so here's what I'd put. void main () { object oNPC = GetObjectByTag("YOUR_TAG_HERE"); object oOPP = GetObjectByTag("YOUR_TAG_HERE"); ChangeToStandardFaction(oNPC, STANDARD_FACTION_PREY); ChangeToStandardFaction(oOPP, STANDARD_FACTION_PREDATOR); ExecuteScript("k_ai_master", oOPP, 1005); int nCurrentHP; nCurrentHP=GetCurrentHitPoints(oNPC); if (nCurrentHP<=40) { int nMax=GetMaxHitPoints(oNPC); effect eHeal=EffectHeal(nMax); ApplyEffectToObject(DURATION_TYPE_PERMANENT, eHeal, oNPC, 0.0); } int nCurrentHP2; nCurrentHP2=GetCurrentHitPoints(oOPP); if (nCurrentHP2<=40) { int nMax2=GetMaxHitPoints(oOPP); effect eHeal2=EffectHeal(nMax2); ApplyEffectToObject(DURATION_TYPE_PERMANENT, eHeal2, oOPP, 0.0); } } That should make each NPC heal each time they go below 40 HP. Link to comment Share on other sites More sharing options...
EnderWiggin Posted July 25, 2008 Share Posted July 25, 2008 That should make each NPC heal each time they go below 40 HP. Darn. That's what I get for trying to script away from my computer _EW_ Link to comment Share on other sites More sharing options...
Istorian Posted July 26, 2008 Share Posted July 26, 2008 @Exile Great script!! @EW Don't worry, EW!! We all know you're a great scripter!!! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.