kane4355 Posted July 8, 2012 Author Share Posted July 8, 2012 Variable 6 Used as a combat state flag on a number of packages. Used by HoldPosition*UntilReleased packages as a way to 'release' enemies from their post once the player passes it. Used by the Hag's End Hagraven to track her boss battle state. Used by the Frostmere Crypt Wispmother to track her battle state. but what does setting it to 1 do? Link to comment Share on other sites More sharing options...
kane4355 Posted July 8, 2012 Author Share Posted July 8, 2012 okay so good news - the teleport thingy works. everything works up until this point except like i said before, he teleports to that location and starts veering off until he is teleported 15 seconds later. the 25% part didint work but i think that is because i havent fully implemented that stage but i will double check it. it also triggers just the way it is supposed to at the right stage. actually now that i think about it i dont even know if the loop is working. because as soon as he got the the last positoon it stopped... but i couldnt tell if it stopped because he reached 25%. but he didint teleport like its established in the properties. Link to comment Share on other sites More sharing options...
kane4355 Posted July 8, 2012 Author Share Posted July 8, 2012 i made some modifications and I am gonna see if this works: as far as the loop goes i do not know... im wondering if while actually works like it is supposed to. i never see it being used by bethesda even though it is a viable statement. Scriptname DKRashteleportPhaseset01 extends ObjectReference Actor Property NPC1 Auto int NPC1Phase = 0 ;initiates phase increment value ObjectReference Property teleportnointeraction01 auto Quest Property myQuest01 auto int Property StageSet01 auto int Property StageSet02 auto int Property StageSet03 auto ObjectReference Property DKRAGfake01 auto ObjectReference Property DKRAGfake02 auto ObjectReference Property DKRAGdraugrthrall01 auto ObjectReference Property DKQRAGDP01 auto ObjectReference Property DKQRAGDP02 auto ObjectReference Property teleport01 auto ObjectReference Property teleport02 auto ObjectReference Property teleport03 auto ObjectReference Property teleport04 auto ObjectReference Property teleport05 auto ObjectReference Property teleport06 auto ObjectReference Property teleportlight01 auto ObjectReference Property teleportlight02 auto ObjectReference Property teleportlight04 auto ObjectReference Property teleportlight05 auto event onActivate(objectReference akActivator) if NPC1Phase == 1 ;Initiate Phase 6 NPC1.SetAV("Variable06", 1) NPC1.MoveTo(teleportnointeraction01) DKQRAGDP02.Enable() myQuest01.SetStage(StageSet03) DKRAGfake01.Enable() Debug.Trace("NPC1 has less then 25% health remaining") elseif NPC1Phase == 0 float NPC1Health = NPC1.GetAVPercentage("Health") if (NPC1Health <= 0.25) NPC1Phase = NPC1Phase +1 else NPC1.SetAV("Variable06", 1) Utility.Wait(15) teleportlight01.Enable() NPC1.MoveTo(teleport01) Utility.Wait(15) teleportlight01.Disable() teleportlight02.Enable() NPC1.MoveTo(teleport02) Utility.Wait(15) teleportlight02.Disable() NPC1.MoveTo(teleport03) Utility.Wait(15) teleportlight04.Enable() NPC1.MoveTo(teleport04) Utility.Wait(15) teleportlight04.Disable() teleportlight05.Enable() NPC1.MoveTo(teleport05) Utility.Wait(15) teleportlight05.Disable() NPC1.MoveTo(teleport06) endif endif endevent Link to comment Share on other sites More sharing options...
kane4355 Posted July 8, 2012 Author Share Posted July 8, 2012 Okay i did some research and looked into some other vanilla scripts and think i figured out my little problem. i created a function and in that function it does a check on health and if that health reaches a certain level then it performs the actions it needs to. then, i left the teleportation to in an onactivate event, running my function every teleport (if there is a way to run the function continuously let me know) but every teleport it will conduct a check and thus running the function as such: Scriptname DKRashteleportPhaseset01 extends ObjectReference Actor Property NPC1 Auto int NPC1Phase = 0 ;initiates phase increment value ObjectReference Property teleportnointeraction01 auto Quest Property myQuest01 auto int Property StageSet01 auto int Property StageSet02 auto int Property StageSet03 auto ObjectReference Property DKRAGfake01 auto ObjectReference Property DKRAGfake02 auto ObjectReference Property DKRAGdraugrthrall01 auto ObjectReference Property DKQRAGDP01 auto ObjectReference Property DKQRAGDP02 auto ObjectReference Property teleport01 auto ObjectReference Property teleport02 auto ObjectReference Property teleport03 auto ObjectReference Property teleport04 auto ObjectReference Property teleport05 auto ObjectReference Property teleport06 auto ObjectReference Property teleportlight01 auto ObjectReference Property teleportlight02 auto ObjectReference Property teleportlight04 auto ObjectReference Property teleportlight05 auto bool IncrementPhase = False float NPC1Health = 0.0 Function IncrementNPC1Phase() if (!IncrementPhase) ;Lock down the function IncrementPhase = true NPC1Health = NPC1.GetAVPercentage("Health") if (NPC1Health <= 0.25 && NPC1Health > 0) NPC1Phase = NPC1Phase +1 endif if NPC1Phase == 1 ;Initiate Phase 6 NPC1.SetAV("Variable06", 1) NPC1.MoveTo(teleportnointeraction01) DKQRAGDP02.Enable() myQuest01.SetStage(StageSet03) DKRAGfake01.Enable() Debug.Trace("NPC1 has less then 25% health remaining") ;Release the lock IncrementPhase = false endif endif endfunction Event onActivate(objectReference akActivator) if NPC1Phase == 0 && NPC1Health > 0.25 NPC1.SetAV("Variable06", 1) IncrementNPC1Phase() Utility.Wait(15) teleportlight01.Enable() NPC1.MoveTo(teleport01) IncrementNPC1Phase() Utility.Wait(15) teleportlight01.Disable() teleportlight02.Enable() NPC1.MoveTo(teleport02) IncrementNPC1Phase() Utility.Wait(15) teleportlight02.Disable() NPC1.MoveTo(teleport03) IncrementNPC1Phase() Utility.Wait(15) teleportlight04.Enable() NPC1.MoveTo(teleport04) IncrementNPC1Phase() Utility.Wait(15) teleportlight04.Disable() teleportlight05.Enable() NPC1.MoveTo(teleport05) IncrementNPC1Phase() Utility.Wait(15) teleportlight05.Disable() NPC1.MoveTo(teleport06) IncrementNPC1Phase() endif endevent Link to comment Share on other sites More sharing options...
kane4355 Posted July 8, 2012 Author Share Posted July 8, 2012 *sigh* i really suck at this. i had to switch the onactivate to be first before the function but the change in phase is still not happening WTF.... so function idea is out the window.... Link to comment Share on other sites More sharing options...
kane4355 Posted July 8, 2012 Author Share Posted July 8, 2012 persistence.... here is another version.. here we go testing: Scriptname DKRashteleportPhaseset02 extends ObjectReference Actor Property NPC1 Auto int NPC1Phase = 0 ;initiates phase increment value ObjectReference Property teleportnointeraction01 auto Quest Property myQuest01 auto int Property StageSet01 auto int Property StageSet02 auto int Property StageSet03 auto ObjectReference Property DKRAGfake01 auto ObjectReference Property DKRAGfake02 auto ObjectReference Property DKRAGdraugrthrall01 auto ObjectReference Property DKQRAGDP01 auto ObjectReference Property DKQRAGDP02 auto ObjectReference Property teleport01 auto ObjectReference Property teleport02 auto ObjectReference Property teleport03 auto ObjectReference Property teleport04 auto ObjectReference Property teleport05 auto ObjectReference Property teleport06 auto ObjectReference Property teleportlight01 auto ObjectReference Property teleportlight02 auto ObjectReference Property teleportlight04 auto ObjectReference Property teleportlight05 auto bool IncrementPhase = False float NPC1Health = 0.0 Event OnHit(ObjectReference aggressor, Form weap, Projectile proj, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked) AssessHealth() if NPC1Phase == 1 ;Initiate Phase 6 NPC1.SetAV("Variable06", 0) NPC1.MoveTo(teleportnointeraction01) DKQRAGDP02.Enable() myQuest01.SetStage(StageSet03) DKRAGfake01.Enable() Debug.Trace("NPC1 has less then 25% health remaining") ;Release the lock IncrementPhase = false elseif NPC1Phase == 0 NPC1.SetAV("Variable06", 1) Utility.Wait(15) teleportlight01.Enable() NPC1.MoveTo(teleport01) Utility.Wait(15) teleportlight01.Disable() teleportlight02.Enable() NPC1.MoveTo(teleport02) Utility.Wait(15) teleportlight02.Disable() NPC1.MoveTo(teleport03) Utility.Wait(15) teleportlight04.Enable() NPC1.MoveTo(teleport04) Utility.Wait(15) teleportlight04.Disable() teleportlight05.Enable() NPC1.MoveTo(teleport05) Utility.Wait(15) teleportlight05.Disable() NPC1.MoveTo(teleport06) endif endEvent Function AssessHealth() NPC1Health = NPC1.GetAVPercentage("Health") if (NPC1Health <= 0.25 && NPC1Health > 0) NPC1Phase = NPC1Phase +1 endif endfunction and another possible: Scriptname DKRashteleportPhaseset02 extends Actor Actor Property NPC1 Auto int NPC1Phase = 0 ;initiates phase increment value ObjectReference Property teleportnointeraction01 auto Quest Property myQuest01 auto int Property StageSet01 auto int Property StageSet02 auto int Property StageSet03 auto ObjectReference Property DKRAGfake01 auto ObjectReference Property DKRAGfake02 auto ObjectReference Property DKRAGdraugrthrall01 auto ObjectReference Property DKQRAGDP01 auto ObjectReference Property DKQRAGDP02 auto ObjectReference Property teleport01 auto ObjectReference Property teleport02 auto ObjectReference Property teleport03 auto ObjectReference Property teleport04 auto ObjectReference Property teleport05 auto ObjectReference Property teleport06 auto ObjectReference Property teleportlight01 auto ObjectReference Property teleportlight02 auto ObjectReference Property teleportlight04 auto ObjectReference Property teleportlight05 auto bool IncrementPhase = False float NPC1Health = 0.0 Event OnHit(ObjectReference aggressor, Form weap, Projectile proj, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked) AssessHealth() if NPC1Phase == 1 ;Initiate Phase 6 NPC1.SetAV("Variable06", 0) NPC1.MoveTo(teleportnointeraction01) DKQRAGDP02.Enable() myQuest01.SetStage(StageSet03) DKRAGfake01.Enable() Debug.Trace("NPC1 has less then 25% health remaining") ;Release the lock IncrementPhase = false else RAGRandomTeleport() endif endEvent Function AssessHealth() NPC1Health = NPC1.GetAVPercentage("Health") if (NPC1Health <= 0.25 && NPC1Health > 0) NPC1Phase = NPC1Phase +1 endif endfunction Function RAGRandomTeleport() If NPC1Phase == 0 && NPC1Health > 0.25 && NPC1Health < 0.50 ;Rash Aul Ghuul chooses at random between six locations. int RAGSpot = Utility.RandomInt(1, 6) if (RAGSpot == 1) NPC1.MoveTo(teleport01) teleportlight01.Enable() teleportlight02.Disable() teleportlight04.Disable() teleportlight05.Disable() ElseIf (RAGSpot == 2) NPC1.MoveTo(teleport02) teleportlight02.Enable() teleportlight01.Disable() teleportlight04.Disable() teleportlight05.Disable() ElseIf (RAGSpot == 3) NPC1.MoveTo(teleport03) teleportlight01.Disable() teleportlight02.Disable() teleportlight04.Disable() teleportlight05.Disable() ElseIf (RAGSpot == 4) NPC1.MoveTo(teleport04) teleportlight04.Enable() teleportlight01.Disable() teleportlight02.Disable() teleportlight05.Disable() ElseIf (RAGSpot == 5) NPC1.MoveTo(teleport05) teleportlight05.Enable() teleportlight01.Disable() teleportlight02.Disable() teleportlight04.Disable() Elseif (RAGSpot == 6) NPC1.MoveTo(teleport06) teleportlight01.Disable() teleportlight02.Disable() teleportlight04.Disable() teleportlight05.Disable() EndIf Else ;Do Nothing Endif EndFunction if the second one works, i can definately make combining these scripts possible. Link to comment Share on other sites More sharing options...
kane4355 Posted July 8, 2012 Author Share Posted July 8, 2012 holy crap the second script works!!! OMG there is hope yet! i just need to alter the random effect so that the teleport happens out of LOS or further away from player so it doesnt look so... weird? the phase shifted but NPC1 didint disable correctly and i have to look at the quest set for that. I also been having an issue with the NPC1 healing itself when it gets towards death. i had an outfit for him that has the ultra helm in there and i took it off... i was able to kill him but he still healed once over and does not have a restoration spell. oh well, at least i got things figured out so far... just minor tweaking hre and there and then i can combine. i will be working on the next phase now :) final phase! Link to comment Share on other sites More sharing options...
kane4355 Posted July 9, 2012 Author Share Posted July 9, 2012 is there anyway to force someone into bleedout without having to make them essential? unfortuantely with my last phase, making him bleedout is paramount in what i am trying to do. the last phase is basically a go all out until you get npc1 to bleedout, the he gets teleported to the center of the room, where he kneels before his own weapon. He has no bleedout recovery so he stays there until you strike the object in front of him, killing him. In essence to kill this guy you must infict damage onto his weapon during this stage. here is the script for the last phase: Scriptname DKRashteleportPhaseset03 extends Actor Actor Property NPC1 Auto ObjectReference Property teleportnointeraction01 auto Quest Property myQuest01 auto int NPC1Phase04 = 0 int Property StageSet01 auto int Property StageSet02 auto int Property StageSet03 auto int Property StageSet04 auto ObjectReference Property DKRAGfake01 auto ObjectReference Property DKRAGfake02 auto ObjectReference Property DKRAGdraugrthrall01 auto ObjectReference Property DKQRAGDP01 auto ObjectReference Property DKQRAGDP02 auto ObjectReference Property teleport01 auto ObjectReference Property teleport02 auto ObjectReference Property teleport03 auto ObjectReference Property teleport04 auto ObjectReference Property teleport05 auto ObjectReference Property teleport06 auto ObjectReference Property teleportlight01 auto ObjectReference Property teleportlight02 auto ObjectReference Property teleportlight04 auto ObjectReference Property teleportlight05 auto ObjectReference Property BleedoutLocation auto ObjectReference Property Adkarastatic auto float NPC1Health = 0.0 Event OnEnterBleedout() If NPC1Phase04 == 0 NPC1Phase04 = NPC1Phase04 + 1 endif endevent Event OnHit(ObjectReference aggressor, Form weap, Projectile proj, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked) If NPC1Phase04 == 0 RAGRandomTeleport() elseIf NPC1Phase04 == 1 BleedoutPhase() endif endEvent Function RAGRandomTeleport() If NPC1Phase04 == 0 && NPC1Health > 0 && NPC1Health < 0.25 ;Rash Aul Ghuul chooses at random between six locations. int RAGSpot = Utility.RandomInt(1, 6) if (RAGSpot == 1) NPC1.MoveTo(teleport01) teleportlight01.Enable() teleportlight02.Disable() teleportlight04.Disable() teleportlight05.Disable() ElseIf (RAGSpot == 2) NPC1.MoveTo(teleport02) teleportlight02.Enable() teleportlight01.Disable() teleportlight04.Disable() teleportlight05.Disable() ElseIf (RAGSpot == 3) NPC1.MoveTo(teleport03) teleportlight01.Disable() teleportlight02.Disable() teleportlight04.Disable() teleportlight05.Disable() ElseIf (RAGSpot == 4) NPC1.MoveTo(teleport04) teleportlight04.Enable() teleportlight01.Disable() teleportlight02.Disable() teleportlight05.Disable() ElseIf (RAGSpot == 5) NPC1.MoveTo(teleport05) teleportlight05.Enable() teleportlight01.Disable() teleportlight02.Disable() teleportlight04.Disable() Elseif (RAGSpot == 6) NPC1.MoveTo(teleport06) teleportlight01.Disable() teleportlight02.Disable() teleportlight04.Disable() teleportlight05.Disable() EndIf Else ;Do Nothing Endif EndFunction Function BleedoutPhase() ;Initiate Phase 8 NPC1.MoveTo(BleedoutLocation) Adkarastatic.enable() myQuest01.SetStage(StageSet04) NPC1.SetNoBleedoutRecovery(true) Debug.Trace("NPC1 has entered bleedout") endfunction and the script for the weapon: Scriptname DKadkarastaticscript extends ObjectReference Actor Property NPC1 auto Actor Property player auto ObjectReference Property Adkarastatic auto ObjectReference Property destroyadkaraFX auto Sound Property mySound01 auto ObjectReference Property RAGremains auto ObjectReference Property RAGkilledFX auto Weapon Property Adkara auto Quest Property myQuest auto int Property StageSet auto Event OnHit(ObjectReference aggressor, Form weap, Projectile proj, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked) destroyadkaraFX.Enable() RAGkilledFX.Enable() int instanceID = mySound01.play(self) Utility.Wait(10) NPC1.Disable() Adkarastatic.Disable() destroyadkaraFX.Disable() RAGkilledFX.Disable() Sound.StopInstance(instanceID) myQuest.SetStage(StageSet) player.additem (Adkara) endevent seems simple enough right? WRONG!!! making him essential gives him full health EVERYTIME he teleports to include the phase where he randomly teleports sending it into an ongoing endless charade and screwing up the scripts big time. my next route is to assign him the ultra mask effect but to have it happen everytime and the ONLY way to stop him is to strike the adkara. that is only if i cant get a work around for this problem. Link to comment Share on other sites More sharing options...
kane4355 Posted July 9, 2012 Author Share Posted July 9, 2012 and voila! i got it to work. the whole fight with the boss works exactly the way i want it to. few minor bugs and tweaks here and there but other than that it is perfect! here is the final script: (and please check out my mod if you want to see how the fight goes) last phase on NPC1: Scriptname DKRashteleportPhaseset03 extends Actor Actor Property NPC1 Auto ActorBase Property NPC1BaseActorProperty auto ObjectReference Property teleportnointeraction01 auto Quest Property myQuest01 auto int NPC1Phase04 = 0 int Property StageSet01 auto int Property StageSet02 auto int Property StageSet03 auto int Property StageSet04 auto ObjectReference Property DKRAGfake01 auto ObjectReference Property DKRAGfake02 auto ObjectReference Property DKRAGdraugrthrall01 auto ObjectReference Property DKQRAGDP01 auto ObjectReference Property DKQRAGDP02 auto ObjectReference Property teleport01 auto ObjectReference Property teleport02 auto ObjectReference Property teleport03 auto ObjectReference Property teleport04 auto ObjectReference Property teleport05 auto ObjectReference Property teleport06 auto ObjectReference Property teleportlight01 auto ObjectReference Property teleportlight02 auto ObjectReference Property teleportlight04 auto ObjectReference Property teleportlight05 auto ObjectReference Property BleedoutLocation auto ObjectReference Property Adkarastatic auto float NPC1Health = 0.0 Event OnEnterBleedout() NPC1Phase04 = NPC1Phase04 + 1 Debug.Trace("NPC1 has entered bleedout") endevent Event OnHit(ObjectReference aggressor, Form weap, Projectile proj, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked) NPC1Health = NPC1.GetAVPercentage("Health") If (NPC1Health <= 0.20 && NPC1Health > 0.05) NPC1.GetActorBase().SetEssential() NPC1.SetNoBleedoutRecovery(true) Debug.Trace("NPC1 is now essential and cannot recover") endif ;check to see if bleedout is true, calling the next event for final phase If NPC1Phase04 == 0 ;Do nothing elseIf NPC1Phase04 == 1 BleedoutPhase() endif endEvent Function BleedoutPhase() ;Initiate Phase 8 NPC1.MoveTo(BleedoutLocation) Adkarastatic.enable() myQuest01.SetStage(StageSet04) Debug.Trace("NPC1 is essential non-recoverable, has entered next phase, and awaits player action") endfunction adkara strike script: Scriptname DKadkarastaticscript extends ObjectReference Actor Property NPC1 auto Actor Property player auto ObjectReference Property Adkarastatic auto ObjectReference Property destroyadkaraFX auto Sound Property mySound01 auto ObjectReference Property RAGremains auto ObjectReference Property RAGkilledFX auto Weapon Property Adkara auto Quest Property myQuest auto int Property StageSet auto Event OnHit(ObjectReference aggressor, Form weap, Projectile proj, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked) destroyadkaraFX.Enable() RAGkilledFX.Enable() int instanceID = mySound01.play(self) Utility.Wait(10) Adkarastatic.Disable() NPC1.KillEssential(player) Utility.Wait(2) NPC1.Disable() RAGremains.Enable() destroyadkaraFX.Disable() RAGkilledFX.Disable() Sound.StopInstance(instanceID) myQuest.SetStage(StageSet) player.additem (Adkara) endevent Link to comment Share on other sites More sharing options...
Lucasistheman Posted July 9, 2012 Share Posted July 9, 2012 That's great! I am looking forward to seeing the mod, please send us a link :) Link to comment Share on other sites More sharing options...
Recommended Posts