Jump to content

Need scripter for advanced boss fight


Vandrath

Recommended Posts

I was just testing the fight with the extra utility.wait command and the wait command didnt work. No Visual effects play but i found out something else in the process. I play a melee character and i executed the boss before the last mist phase. When the execution finished playing the boss died but still went into mist phase BUT when he came out of mist phase his body was lying directly on one of the array locations with NO clothes on.
Link to comment
Share on other sites

I've tested the script and modified it a little so that the actor won't teleport if he gets killed. I've also added a bit of code that will place a fog object where the boss is standing when he teleports. the teleportation to the xmarkers works btw, so I don't know what you did wrong when you set the properties. I added a trace statement so that you can check the logs to see what marker reference the boss teleports to. For the fog effect to work, drag a "FXFog01" Movable Static Effect to the Render Window and position it near the boss. Right-click on it and set it to "initially disabled". Then set the script property "Fog" to the FXFog01 objectreference that you just placed in the cell. It will show up in-game as a mist where the boss fades away.

 

For the mist, I dragged an "FXMistLow02Rnd" Movable Static Effect into the Render Window. Right-click it and set it to initially disabled. Then set the mist Property to the reference you just placed.

For the VisualEffect I used "TFXfogVT". It was hard to tell if this did anything in-game or not. I did notice some sorty of foggy moire pattern in the dungeon where I was testing.

The markers I used were just regular XMarkers objects.

 

I used EncVampire03BossImperialIM for testing. Actually, the first time he faded away and teleported it actually freaked me out a bit :tongue: . I didn't have any issues with him losing his clothes.

 

 

Scriptname BossFight extends Actor  

Sound Property soundFX Auto
VisualEffect Property FX  Auto  
ObjectReference Property Mist auto ; set to the mist
ObjectReference Property Fog auto ; set to the fog object (eg. FXFog01)
ObjectReference[] Property teleportMarkers auto ; fill the array with teleport markers
int stage = 0

Event OnInit()
stage = 0	; reset this when the actor respawns
EndEvent

event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, \
bool abBashAttack, bool abHitBlocked)
float fHealthPercent = getAVPercentage("health")
if  stage == 0 && fHealthPercent <= 0.75 && fHealthPercent > 0.25
	stage += 1
	MistPhase()
elseif  stage == 1 && fHealthPercent <= 0.25 && fHealthPercent > 0.01
	stage += 1
	MistPhase()
endif
endEvent

function MistPhase() 
If !IsDead()
	int randomMarker = utility.RandomInt(0, teleportMarkers.length - 1) ; don't forget that the first item# in the array is ZERO, so the last item#  is "length - 1"

	Fx.play(self)
	Fog.MoveTo(self)
	disableNoWait(True)      ; fades-out the actor without pausing the script.
	Fog.EnableNoWait(True)
	mist.enable(True)        ; fades-in the mist. The script pauses until the fade-in has completed.
	utility.wait(10.0)
	Fog.Disable(True)
	Debug.Trace("[bossFight]Marker = " + teleportMarkers[randomMarker])
	moveTo(teleportMarkers[randomMarker])
	mist.disableNoWait(True) ; fade-out the mist without pausing the script
	enableNoWait(True)       ; fade-in the actor without pausing the script
	StartCombat(Game.GetPlayer())
EndIf
endFunction

Event OnDying(Actor akKiller)
{it is probably preferable to play the death sound in OnDying rather than OnDeath to avoid sound delay}
if akKiller == Game.GetPlayer()
	int instanceID = soundFX.play(self)
	Sound.SetInstanceVolume(instanceID, 1.0)
endIf
endEvent

 

 

Edit: I added a line to force the boss to attack the player when he fades back in because disabling the boss makes the combat stop.

 

Edit: I've attached a demo esp. To use, just enter the console and type "coc qasmoke" to teleport to the test cell.

Edited by steve40
Link to comment
Share on other sites

I tested the fight about 5 times and it looks like the boss is now moving between his initial spawn and one of the array locations only. The boss changed his clothing once in between the inital fadeout and the fade in. He was wearing the dlc vampire regular attire and when he re appeared he was wearing noblemans green clothes. I only had time for 5 quick tests. Ive got a busy day today so i cant actually sit down and take my time until later today. Thanks again for all your help.

 

Edit: tested using your esp.

Edited by Vandrath
Link to comment
Share on other sites

I didn't get that clothing problem, so probably you are using some sort of clothing or armor mods that are causing problems. It is not the script, it doesn't touch any of that stuff. It might even be that that particular NPC has a quest that is controlling what clothes he wears when he spawns. Try using a non-unique actor that is not essential for any vanilla/Dawnguard quests.
Link to comment
Share on other sites

I tried a few more tests, this time in my own test esp. The arrays still dont work in mine. Could that be because i have changed the script so much? When i was testing using your esp it seemed like only one array location was working. Could these issues be caused by another mod i am currently using?

The clothing issue is still there when using a non unique actor. The actor changes clothes when he re appears after the first mist phase but after the second mist phase the clothes return to normal. With the way i am going to setup this fight the clothes issue is easily overlooked.

Link to comment
Share on other sites

The marker selection is random.

The clothing problem is odd. I've never seen this problem at all. Interestingly, a lot of people using Warzones are reporting a similar problem.

Edited by steve40
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...