Jump to content

Creating Boss fight


kane4355

Recommended Posts

Since we're saying to run the phase once a 1/4 or more of the health is gone that means if the player deals damage that gets it to 1/2 or the 50% phase then the 75% stage would be triggered instead of the 50% or 25% stage

 

if (NPC1Health <= 0.75) so here we would have to mention if NPC1Health <= 0.75 && NPC1Health > 0.5 aswell

Link to comment
Share on other sites

  • Replies 60
  • Created
  • Last Reply

Top Posters In This Topic

Since we're saying to run the phase once a 1/4 or more of the health is gone that means if the player deals damage that gets it to 1/2 or the 50% phase then the 75% stage would be triggered instead of the 50% or 25% stage

 

if (NPC1Health <= 0.75) so here we would have to mention if NPC1Health <= 0.75 && NPC1Health > 0.5 aswell

 

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.

Link to comment
Share on other sites

Maybe the phase should be the first and then it should check to see the health of the NPC.

 

 

So simply swap the NPC1Phase and NPC1Health so if NPC1Phase is before if NPC1Health

Edited by Lucasistheman
Link to comment
Share on other sites

Sorry for some reason when I copy and paste the Nexus Forums are adding all that extra code which shouldn't show up. Hopefully they stop doing that with this.

Scriptname CoT00Test 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

 

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 NPC1Phase == 0

if(NPC1Health <= 0.75)

;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 NPC1Phase == 1

if (NPC1Health <= 0.50)

;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 NPC1Phase == 2

if (NPC1Health <= 0.25)

;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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...