kane4355 Posted July 7, 2012 Author Share Posted July 7, 2012 In between these two add an endif and see if this helps in any way. NPC1Phase = NPC1Phase +1 endif elseif (NPC1Health <= 0.50) it wont compile if i do that. Link to comment Share on other sites More sharing options...
kane4355 Posted July 7, 2012 Author Share Posted July 7, 2012 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? Link to comment Share on other sites More sharing options...
kane4355 Posted July 7, 2012 Author Share Posted July 7, 2012 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 Link to comment Share on other sites More sharing options...
Lucasistheman Posted July 7, 2012 Share Posted July 7, 2012 (edited) Try and see if this works, Scriptname DKRashPhaseset01 extends Actor Actor Property NPC1 Auto int NPC1Phase = 0 ;initiates phase increment valueObjectReference Property teleportnointeraction01 autoQuest Property myQuest01 autoint Property StageSet01 autoint Property StageSet02 autoint Property StageSet03 autoObjectReference Property DKRAGfake01 autoObjectReference Property DKRAGfake02 autoObjectReference Property DKRAGdraugrthrall01 autoObjectReference Property DKQRAGDP01 autoObjectReference 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 linesfloat NPC1Health = NPC1.GetAVPercentage("Health") if (NPC1Health <= 0.75) if NPC1Phase == 0 ;Initiate Phase 2 NPC1.MoveTo (teleportnointeraction01) DKRAGdraugrthrall01.Enable() myQuest01.SetStage(StageSet01) DKRAGfake01.Enable(true) Debug.Trace("NPC1 has less then 75% health remaining") NPC1Phase = NPC1Phase +1 endifelseif (NPC1Health <= 0.50) if 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 endifelseif (NPC1Health <= 0.25) if 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 endifendIfEndEvent Edited July 7, 2012 by Lucasistheman Link to comment Share on other sites More sharing options...
kane4355 Posted July 7, 2012 Author Share Posted July 7, 2012 (edited) Try and see if this works, Scriptname DKRashPhaseset01 extends Actor Actor Property NPC1 Auto int NPC1Phase = 0 ;initiates phase increment valueObjectReference Property teleportnointeraction01 autoQuest Property myQuest01 autoint Property StageSet01 autoint Property StageSet02 autoint Property StageSet03 autoObjectReference Property DKRAGfake01 autoObjectReference Property DKRAGfake02 autoObjectReference Property DKRAGdraugrthrall01 autoObjectReference Property DKQRAGDP01 autoObjectReference 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 linesfloat NPC1Health = NPC1.GetAVPercentage("Health") if (NPC1Health <= 0.75) if NPC1Phase == 0 ;Initiate Phase 2 NPC1.MoveTo (teleportnointeraction01) DKRAGdraugrthrall01.Enable() myQuest01.SetStage(StageSet01) DKRAGfake01.Enable(true) Debug.Trace("NPC1 has less then 75% health remaining") NPC1Phase = NPC1Phase +1 endifelseif (NPC1Health <= 0.50) if 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 endifelseif (NPC1Health <= 0.25) if 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 endifendIf<br class="Apple-interchange-newline"> 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 ENDEVENTNo 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. Edited July 7, 2012 by kane4355 Link to comment Share on other sites More sharing options...
Lucasistheman Posted July 7, 2012 Share Posted July 7, 2012 Yeah, sorry I am not best at formatting and I missed a line. Just remove "<br class="Apple-interchange-newline">" and add EndEvent to the end. Link to comment Share on other sites More sharing options...
kane4355 Posted July 7, 2012 Author Share Posted July 7, 2012 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%.... Link to comment Share on other sites More sharing options...
Lucasistheman Posted July 7, 2012 Share Posted July 7, 2012 All I can think of is are your properties filled in properly? Link to comment Share on other sites More sharing options...
kane4355 Posted July 7, 2012 Author Share Posted July 7, 2012 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. Link to comment Share on other sites More sharing options...
kane4355 Posted July 7, 2012 Author Share Posted July 7, 2012 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. Link to comment Share on other sites More sharing options...
Recommended Posts