Vandrath Posted September 25, 2012 Share Posted September 25, 2012 I am currently working on a mod which will require a vampire boss fight. In my research on vampires throughout Elder Scrolls lore i found that Bosmer Vampires (the Kellrlith) from Valenwood can disintegrate into mist on command. I have an idea about how the fight will work based on the CKs abilities. I have little knowledge of scripting and would like to work with a scripter on this and other boss fights i have planned for the mod. As well as other projects in the future. My idea for the boss is as follows: When boss reaches 75% health (keep in mind the boss will have a lot of health) the boss will teleport to either an x marker (or x marker heading)in an exterior cell and wait for 10 seconds. During the 10 seconds in which the boss is out of the cell, the boss fight area will fill with mist and fog (the basic FX from the CK) After the 10 seconds the boss will teleport to a random X marker placed in the original boss fight room and the fog and mist will clear. The entire effect will repeat again at 25% health. This process will simulate the effect the player will see as the vampire turning into mist. This is just my vision of how the fight will play out mechanically. The reality of it might be different based on how papyrus actually works. Also i DO NOT want to use SKSE unless its impossible for the vanilla scripts to accomplish this task. Link to comment Share on other sites More sharing options...
Vandrath Posted September 27, 2012 Author Share Posted September 27, 2012 (edited) ... Edited September 27, 2012 by Vandrath Link to comment Share on other sites More sharing options...
Sjogga Posted September 27, 2012 Share Posted September 27, 2012 Don't bump your own threads, people have been banned for this.Anyway add this to your boss: scriptname bossFight extends actor ObjectReference Property Mist auto ; set to the mist ObjectReference[] Property teleportMarkers auto ; fill the array with teleport markers int stage = 0 event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, \ bool abBashAttack, bool abHitBlocked) if( (self.getav(health) as float) <= (self.getbaseav("health") as float) * 0.75 ) && stage == 0 stage += 1 MistPhase() elseif( (self.getav(health) as float) <= (self.getbaseav("health") as float) * 0.25 ) && stage == 1 stage += 1 MistPhase() endif endEvent function MistPhase() self.setalpha(0.0, true) Mist.enable() utility.wait(0.5) self.disable() utility.wait(10.0) int randomMarker = utility.RandomInt(0, teleportMarkers.length) self.moveto(teleportMarkers[randomMarker]) self.enable() self.setAlpha(1.0,true) mist.disable() endFunction Link to comment Share on other sites More sharing options...
Vandrath Posted September 27, 2012 Author Share Posted September 27, 2012 Didnt realize about the bump. Thanks for letting me know and thank you for the script. Ill try it out today. Link to comment Share on other sites More sharing options...
Vandrath Posted September 27, 2012 Author Share Posted September 27, 2012 (edited) Do i define the "mist" in the script properties? Can i define more then 1 mist by connecting multiple FXmists together via an X marker? tried to compile the script just now and got this: Starting 1 compile threads for 1 files...Compiling "BossFight"...c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\BossFight.psc(11,23): variable health is undefinedc:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\BossFight.psc(14,27): variable health is undefinedNo output generated for BossFight, compilation failed. Batch compile of 1 files finished. 0 succeeded, 1 failed.Failed on BossFight Could you please explain how to set this up? Edited September 27, 2012 by Vandrath Link to comment Share on other sites More sharing options...
Sjogga Posted September 27, 2012 Share Posted September 27, 2012 My bad. Replace (self.getav(health) as float) with (self.getav("health") as float) Link to comment Share on other sites More sharing options...
Vandrath Posted September 27, 2012 Author Share Posted September 27, 2012 My bad. Replace (self.getav(health) as float) with (self.getav("health") as float) that made the script work. I tested the fight and came up with a few more issues. I defined the teleport markers as 4 Xmarker headings but the boss is not placed at any of the markers when he re appears. He just re appears at his initial spawn. I would like to set up more then 1 mist. I tried using a trap linker to link 2 fxmists, then set the mist object ref to the trap linker but the mist was always there. I would like the mist to appear when the boss teleports away and disappear when the boss reappears. Also I would like to add a visual effect to compliment the boss teleporting away and re appearing. Link to comment Share on other sites More sharing options...
steve40 Posted September 28, 2012 Share Posted September 28, 2012 (edited) There's a bug in the script. The first entry# in an array is array[0], so the last entry# is always array[length - 1], not array[length] :) Also, the fade-out in the MistPhase() function could be handled in a simpler way: function MistPhase() disableNoWait(True) ; fades-out the actor without pausing the script. mist.enable(True) ; fades-in the mist. The script pauses until the fade-in has completed. utility.wait(10.0) 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" moveTo(teleportMarkers[randomMarker]) mist.disableNoWait(True) ; fade-out the mist without pausing the script enableNoWait(True) ; fade-in the actor without pausing the script endFunction Also, there's no need to call functions on "self", as "self" is implied by default. You would mainly use "self" when it is needed to be passed as a parameter _into_ a function. Edited September 28, 2012 by steve40 Link to comment Share on other sites More sharing options...
Vandrath Posted September 28, 2012 Author Share Posted September 28, 2012 There's a bug in the script. The first entry# in an array is array[0], so the last entry# is always array[length - 1], not array[length] :) What does that mean? keep in mind that i am in no way a scripter. i only know enough to slightly understand what these scripts do at a glance. Link to comment Share on other sites More sharing options...
Vandrath Posted September 28, 2012 Author Share Posted September 28, 2012 I have another Request if you guys dont mind. This one should be simple (i think). I would like a script that will do the following: on combat start with a specific enemy actor make a static object appear. that static object would then only be able to be deactivated by an activator (such as a lever). the goal of this is to lock the player in a certain area for a boss fight then have the boss drop the key to open the door where the lever is located I dont know if its proper to have multiple posts for multiple script requests or just have them in one post? Link to comment Share on other sites More sharing options...
Recommended Posts