jsc17 Posted August 1, 2011 Share Posted August 1, 2011 (edited) ScriptName UnderDeepBossKingAtanUlak Begin GameMode Short Health if Health <= ( GetActorValue Health / 2 ) KingAtanUlak.AddSpell UDBossKingAtanUlakCorrosiveBolt1 elseif GetActorValue Health endif end This is the script I am trying to get working, from what I know about scripting, everything here seems good, but maybe it's good to get another set of eyes to look it over. the CS isn't giving me any specific errors, but simply asking if I would like to save the current script, Current= ______.Any help would be greatly appreciated!! Edited August 1, 2011 by jsc17 Link to comment Share on other sites More sharing options...
icecreamassassin Posted August 1, 2011 Share Posted August 1, 2011 (edited) well your first problem here is that the Short variable needs to be before the Begin gamemode also what does the use of "getactorvalue health" do for you in this script? Another issue I see here is that there is no actor ref for the "getactorvalue health" shouldn't it be "player.getactorvalue health" or "[NPCNAME].getactorvalue health" ?? also using the getactorvalue function is usually something you do as an IF check rather than an IF/ELSE result function. Can you explain what you are specifically trying to get the script to do, and maybe I can suggest something else Edited August 1, 2011 by icecreamassassin Link to comment Share on other sites More sharing options...
fg109 Posted August 1, 2011 Share Posted August 1, 2011 There doesn't need to be an actor reference for GetAV health if the script is run on the actor already. Other than that, I agree with what icecreamassassin said. Also, I think this is the script you wanted to write: ScriptName UnderDeepBossKingAtanUlak short added Begin GameMode if (GetAV Health < (GetBaseAV Health) / 2) set added to 1 AddSpell UDBossKingAtanUlakCorrosiveBolt1 elseif (added == 1) set added to 0 RemoveSpell UDBossKingAtanUlakCorrosiveBolt1 endif End Link to comment Share on other sites More sharing options...
icecreamassassin Posted August 1, 2011 Share Posted August 1, 2011 Yeah that would make sense, I hadn't thought of the fact that the script might be running on the NPC itself. but yeah I like how you added the "added" variable, this will basically add the spell for him to use when he's at half health and take it away from him if he is above half. Which is useful if there's a chance that he can heal himself or someone else can heal him and you don't want him to have the spell when he has the much health. Good call Link to comment Share on other sites More sharing options...
jsc17 Posted August 1, 2011 Author Share Posted August 1, 2011 Thanks a lot you two for your help! the script you gave me is working as I wanted. I was wanting to have a way to write a script that scales a spell with the mob's health value. I'm pretty new at this, so it seems like I was going in the wrong direction in several places. Thanks again!! Link to comment Share on other sites More sharing options...
Recommended Posts