Jump to content

kane4355

Members
  • Posts

    293
  • Joined

  • Last visited

Everything posted by kane4355

  1. 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
  2. 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.
  3. but what does setting it to 1 do?
  4. do you know what this does? i read somewhere that variable 6 controls certain functions on an actor, possibly idle functions. Self.GetActorRef().SetAV("Variable06", 1)
  5. no, i want combat to persist. the 6 locations the player and the NPC1 can interact with eachother as far as combat, but the 4 locations on the ledge i want NPC1 to stay on the ledge and not move anywhere at all, but can bombard and shoot magic at the player. the other 2 locations he can move around and he so chooses. but now im thinking collision markers will also effect magic so... im stuck on that now.
  6. and linking aptrolidlemarkers to the xmarkerheadings set up as the teleport locations... and setting an idle time. im hoping this keeps the NPC1 in place and not moving around up top. i may have to put collisions planes in place. thats IF the script works lol
  7. changed. im going out on a limb whether this is gonna work.. i also have to put in between the utility waits, an enable/disable on xmarkers control lights and embers in the alcove where the dragon priest will be at.
  8. i will try that... i actually moved onto the next confusing part of the script where it becomes even more complicated. i dont know if this will work but i put it together for the next phase where he teleports to random locations until he reaches 25% health... noting my luck with previous scripts i took it and put it in a seperate script, attached to a trap linker. when the quest is set to the next stage from killing off the dragon priests, the trap linker is activated by a fragment script in the quest stage. here is the script attached to the trap linker: 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 event onActivate(objectReference akActivator) while NPC1Phase < 1 Utility.Wait(15) NPC1.MoveTo(teleport01) Utility.Wait(15) NPC1.MoveTo(teleport02) Utility.Wait(15) NPC1.MoveTo(teleport03) Utility.Wait(15) NPC1.MoveTo(teleport04) Utility.Wait(15) NPC1.MoveTo(teleport05) Utility.Wait(15) NPC1.MoveTo(teleport06) float NPC1Health = NPC1.GetAVPercentage("Health") if (NPC1Health <= 0.25) NPC1Phase = NPC1Phase +1 endif endwhile if NPC1Phase == 1 ;Initiate Phase 6 NPC1.MoveTo(teleportnointeraction01) DKQRAGDP02.Enable() myQuest01.SetStage(StageSet03) DKRAGfake02.Enable() Debug.Trace("NPC1 has less then 25% health remaining") endif endevent it activates once the trap linker activates and im hoping the while loop will teleport this guy every 15 seconds until he reaches 25% health. right now i just want this thing to become possible and with seperate scripts it is. I can come back later to fine tune it but for now it works. i havent tested the above script but it compiles.
  9. ah so ur not gonna believe this! and i do believe that it has to do with something dealing with variables locking up. I was able to make the next phase happen but i had to split it up into two seperate scripts and it worked perfectly fine! here are the scripts: Scriptname DKRashPhaseset01 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 Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, \ bool abBashAttack, bool abHitBlocked) float NPC1Health = NPC1.GetAVPercentage("Health") ; Obtain NPC1's current health actor value to establish phase lines if NPC1Phase == 0 if (NPC1Health <= 0.75 && NPC1Health > 0.5) ;Initiate Phase 2 NPC1.MoveTo(teleportnointeraction01) DKRAGdraugrthrall01.Enable() NPC1.Disable() myQuest01.SetStage(StageSet01) DKRAGfake01.Enable() Debug.Trace("NPC1 has less then 75% health remaining") NPC1Phase = NPC1Phase +1 endif endif endevent Scriptname DKRashPhaseset02 extends Actor Actor Property NPC1 Auto int NPC1Phase = 0 ;initiates phase increment value ObjectReference Property teleportnointeraction01 auto Quest Property myQuest01 auto int Property StageSet02 auto ObjectReference Property DKRAGfake01 auto ObjectReference Property DKRAGfake02 auto ObjectReference Property DKQRAGDP01 auto Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, \ bool abBashAttack, bool abHitBlocked) float NPC1Health = NPC1.GetAVPercentage("Health") ; Obtain NPC1's current health actor value to establish phase lines if NPC1Phase == 0 if (NPC1Health <= 0.5 && NPC1Health > 0.25) ;Initiate Phase 4 NPC1.MoveTo(teleportnointeraction01) DKQRAGDP01.Enable() NPC1.Disable() myQuest01.SetStage(StageSet02) DKRAGfake02.Enable() Debug.Trace("NPC1 has less then 50% health remaining") NPC1Phase = NPC1Phase +1 endif endif endevent i also removed the while loop because it was not needed and voila! it works.... but is this satisfactory being two scripts? they work... or does it tell us where the problem lies? i still have so much to do with the next phase.... im wondering if a while loop will do good at all.
  10. im coming close to just giving up on my intricate boss fight. the way i had the while loop set up above did nothing different and i been messing around with while loops in other areas and it just seems to be causing issues..... this crap is beyond me and i wish i could showvars on an actor im in combat with but unfortunately i cannot. it can tell me which part of the script, whether its the increment or the health isnt working right.
  11. this also might help me me out with the random location part, creating a loop and running him through each location.
  12. here: Scriptname DKRashPhaseset01 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 Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, \ bool abBashAttack, bool abHitBlocked) ; Obtain NPC1's current health actor value to establish phase lines float NPC1Health = NPC1.GetAVPercentage("Health") while NPC1Phase >= 0 && NPC1Phase < 3 if (NPC1Health <= 0.75 && NPC1Health > 0.5) if NPC1Phase == 0 ;Initiate Phase 2 NPC1.MoveTo(teleportnointeraction01) DKRAGdraugrthrall01.Enable() NPC1.Disable() myQuest01.SetStage(StageSet01) DKRAGfake01.Enable() Debug.Trace("NPC1 has less then 75% health remaining") NPC1Phase = NPC1Phase +1 NPC1Health == 0 endif elseif NPC1Phase == 1 if (NPC1Health <= 0.5 && NPC1Health > 0.25) ;Initiate Phase 4 NPC1.MoveTo(teleportnointeraction01) DKQRAGDP01.Enable() NPC1.Disable() myQuest01.SetStage(StageSet02) DKRAGfake01.Enable() Debug.Trace("NPC1 has less then 50% health remaining") NPC1Phase = NPC1Phase +1 NPC1Health == 0 endif elseif NPC1Phase == 2 if (NPC1Health <= 0.25) ;Initiate Phase 6 NPC1.MoveTo(teleportnointeraction01) DKQRAGDP02.Enable() myQuest01.SetStage(StageSet03) DKRAGfake02.Enable() Debug.Trace("NPC1 has less then 25% health remaining") NPC1Phase = NPC1Phase +1 NPC1Health == 0 endif endIf endwhile endevent
  13. have you ever messed with while statements? i did a bit in my college programming essentials class, but never really seen it used much in papyrus, but it compiles. it creates a loop until the while statement is untrue. http://www.creationkit.com/Statement_Reference
  14. ok i will try that. i am reading up on literal references.
  15. i dont know what u just typed there but how can i make it first? it adds the increment based on whether the health is at .75... i cant just add an increment without an IF value.
  16. ok i can add that. thats also why i set up the increment to NPC1phase... once the .75 is hit... then it adds +1 to NPC1Phase thats why there are two if functions one for the health and one for the phase.
  17. ok that didint work either... seriously what the hell. its not making any sense and this should be the least of my worries, especially since the next couple of phases are suposed to be more intricate.
  18. yes they are and i double and triple checked them. in any case the next phase uses the same properties for the moveto function. I am going to try something... i am wondering if NPC1Health is being set up as an integer, as in .75 being the highest integer of the three and since its higher than .5, it doesnt reset. i am going to add a reset value at the end, possibly saying that NPC1Health == 0 to reset the value, just to see if its locking up at .75. notice also how NPC1Health is not set up as a property value because it pulls its property directly from NPC1.GetAVPercentage("Health"). since it gets pulled the first time and sets it to .75, in most cases u cant backtrack unless you minus or replace but i dont think pulling it again is replacing its just hanging up. so i will put an reset value after each stage to clear out the value.
  19. well that didint work either.... the first part still all worked... he teleports back but we just fight until it gets to the end. does kick off at 50%....
  20. this is what i get when it tries to compile : Starting 1 compile threads for 1 files... Compiling "DKRashPhaseset01"... c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\DKRashPhaseset01.psc(0,-1): mismatched input '<EOF>' expecting ENDEVENT No output generated for DKRashPhaseset01, compilation failed. Batch compile of 1 files finished. 0 succeeded, 1 failed. Failed on DKRashPhaseset01 scratch that: i added an endevent at the end and it compiled. i will test it out.
  21. so, i was reading up on the onhit function and it says that it only works with object references or at least its made out that way on the wiki: http://www.creationkit.com/OnHit_-_ObjectReference
  22. its not working with the elseifs or ifs or even endifs... i dont get it. why is it not looping through... why is at stopping?
  23. it wont compile if i do that.
  24. it would if the increment value added up to 3 but since the last phase only added +1 then it only equals 1. it is phase 4, because its phase 4 of the whole fight whereas its the second phase of the script. its just there to help me label everything going on.
  25. i replaced "if"s with elseif's because it wasnt looping at all. it would go through the first iteration of the 75%, teleport him out, call in the draugr, draugr die, bring him in and then id fight him until he was close to death. with elseif and with endif's etc... it is still not looping and I know the incrementing is working because its not looping back in a circle, but neither is he healing himself. the disable/enable idea i had worked and his health did persist through being disabled/enabled. he does not have any healing powers so that works. and now the first part of the fight is working (somewhat) but the next phase is not triggering, the part that starts at 50%. i never had an issue with the first phase happening more than once, it just would not trigger into the 50% phase. here is what i have so far on the script: Scriptname DKRashPhaseset01 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 Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, \ bool abBashAttack, bool abHitBlocked) ; Obtain NPC1's current health actor value to establish phase lines float NPC1Health = NPC1.GetAVPercentage("Health") if (NPC1Health <= 0.75) if NPC1Phase == 0 ;Initiate Phase 2 NPC1.MoveTo(teleportnointeraction01) DKRAGdraugrthrall01.Enable() NPC1.Disable() myQuest01.SetStage(StageSet01) DKRAGfake01.Enable(true) Debug.Trace("NPC1 has less then 75% health remaining") NPC1Phase = NPC1Phase +1 elseif (NPC1Health <= 0.50) elseif NPC1Phase == 1 ;Initiate Phase 4 NPC1.MoveTo(teleportnointeraction01) DKQRAGDP01.Enable() myQuest01.SetStage(StageSet02) DKRAGfake01.Enable(true) Debug.Trace("NPC1 has less then 50% health remaining") NPC1Phase = NPC1Phase +1 elseif (NPC1Health <= 0.25) elseif NPC1Phase == 2 ;Initiate Phase 6 NPC1.MoveTo(teleportnointeraction01) DKQRAGDP02.Enable() myQuest01.SetStage(StageSet03) DKRAGfake02.Enable(true) Debug.Trace("NPC1 has less then 25% health remaining") NPC1Phase = NPC1Phase +1 endif endIf endEvent
×
×
  • Create New...