Shinokage Posted November 25, 2012 Share Posted November 25, 2012 The title pretty much says it. I'm trying to implement a script on a boss fight that would cause him to stop fighting, turn into a werewolf and regain all his lost health. This is what I scripted but I'm new to scripting in Skyrim. It compiled but i'm guessing I just didn't put in in the right spot. Scriptname ShinoGloryTF extends Actor {int lives = 1 GetAVPercentage (health) If health < 10 && lives ==1 lives = lives -- then DoCombatSpellApply(WerewolfChange, ShinoSINEnvyGlory) native SetAVPercentage (health , 100) EndIf} Any help is greatly appreciated! Link to comment Share on other sites More sharing options...
jhncanson Posted November 25, 2012 Share Posted November 25, 2012 What if Killmove kicks in? you should set the boss to be invulnerable to killmoves as to ensure that boss will have its transformation Link to comment Share on other sites More sharing options...
Shinokage Posted November 25, 2012 Author Share Posted November 25, 2012 That is true and I will address it now that you've said something, but I haven't had that problem yet: he just dies a normal death and does nothing. Also, 10% health for this boss is around 400 health so it can happen but it's not likely. RIght now it's just in the scripts for the character and I tried making an AI package but it still doesnt work. Link to comment Share on other sites More sharing options...
Shinokage Posted November 25, 2012 Author Share Posted November 25, 2012 (edited) Now I have this and can not get it to compile.Scriptname ShinoGloryTF extends Actor int lives = 1 Event OnDying (actor akKiller) If lives == 1 lives = 0 ShinoSINEnvyGlory.DoCombatSpellApply(WerewolfChange, ShinoSINEnvyGlory) native ShinoSINEnvyGlory.SetActorValue (health , 2700) EndIf endEvent] Also, i'm retrying using modified code from Konahrik's Mask. Edited November 26, 2012 by Shinokage Link to comment Share on other sites More sharing options...
jhncanson Posted November 26, 2012 Share Posted November 26, 2012 What tool are you using? i havent tried modding myself.. but im well familiar with C++ and Java Link to comment Share on other sites More sharing options...
steve40 Posted November 26, 2012 Share Posted November 26, 2012 (edited) The following script compiles, but I don't know if it will work. I assume you have a working werewolf spell. Don't forget to assign the spell property in the CK. Scriptname ShinoGloryTF extends Actor Spell Property WerewolfChange auto {assign this property in the CK to your werewolf change spell} int lives = 1 Event OnInit() GetActorBase().SetEssential(true) ; initially I will be essential so that I won't die EndEvent Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked) If lives == 1 && GetAVPercentage("Health") <= 0.1 ; check if my health is less than 10% lives = 0 GetActorBase().SetInvulnerable(true) ; make me temporarily invulnerable while I transform WerewolfChange.Cast(self, self) ; cast the change spell on myself Utility.Wait(3) ; allow a few seconds for the change SetAV("Health", GetBaseAV("Health")) ; restore my full base health GetActorBase().SetInvulnerable(false) ; make me vulnerable again GetActorBase().SetEssential(false) ; now make me killable EndIf endEvent Edited November 26, 2012 by steve40 Link to comment Share on other sites More sharing options...
Shinokage Posted November 26, 2012 Author Share Posted November 26, 2012 Therein lies the problem: through quite a bit more scripting and trial and error, i've come to find that the Werewolf Transformation is handled almost exclusively by the script attached to the spell so, no, I don't have a working Werewolf TF spell which creates an entirely new problem. Thank you though for your help, now if you can figure out how to make a working Werewolf TF spell... then I could move forward. I haven't had luck myself. Link to comment Share on other sites More sharing options...
EnaiSiaion Posted November 26, 2012 Share Posted November 26, 2012 Not just killmoves; try a x30 backstab bonus hit. Link to comment Share on other sites More sharing options...
DreamKingMods Posted November 26, 2012 Share Posted November 26, 2012 (edited) Therein lies the problem: through quite a bit more scripting and trial and error, i've come to find that the Werewolf Transformation is handled almost exclusively by the script attached to the spell so, no, I don't have a working Werewolf TF spell which creates an entirely new problem. Thank you though for your help, now if you can figure out how to make a working Werewolf TF spell... then I could move forward. I haven't had luck myself. You don't need to create a new spell, just use the existing one as a property. That is, near the top of your script that extends the actor, you'd have Spell Property WerewolfChange auto Then simply assign that in the Properties window to the spell "WerewolfChange". Edited November 26, 2012 by DreamKingMods Link to comment Share on other sites More sharing options...
Shinokage Posted November 26, 2012 Author Share Posted November 26, 2012 You don't need to create a new spell, just use the existing one as a property. That is, near the top of your script that extends the actor, you'd have Spell Property WerewolfChange auto Then simply assign that in the Properties window to the spell "WerewolfChange". I've tried that. It hasn't worked. It handles it through a script attached to the spell which attempts to see if the player has started the quest for lycanthropy. I haven't had the chance to use steve40's script yet as i'm @ work but i'll give it a shot later. Link to comment Share on other sites More sharing options...
Recommended Posts