Jump to content

Creating Boss fight


kane4355

Recommended Posts

  • Replies 60
  • Created
  • Last Reply

Top Posters In This Topic

Try and see if this works,

 

 

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()

myQuest01.SetStage(StageSet01)

DKRAGfake01.Enable(true)

Debug.Trace("NPC1 has less then 75% health remaining")

NPC1Phase = NPC1Phase +1

endif

elseif (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

endif

elseif (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

endif

endIf

EndEvent

Edited by Lucasistheman
Link to comment
Share on other sites

Try and see if this works,

 

 

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()

myQuest01.SetStage(StageSet01)

DKRAGfake01.Enable(true)

Debug.Trace("NPC1 has less then 75% health remaining")

NPC1Phase = NPC1Phase +1

endif

elseif (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

endif

elseif (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

endif

endIf<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 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.

Edited by kane4355
Link to comment
Share on other sites

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

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...