dlobo1999 Posted April 4, 2017 Share Posted April 4, 2017 (edited) [RESOLVED] Okay, hey guys.TL;DR version:I want to know an elegant version to damage the player(health, magicka, and health regen) via scripts. The level of damage must also be adjustable in the script. Preferably by adding a poison/magic effect. Long Version:<HERE IS THE IMAGE struggling to get the right file type, smh HERE IS THE IMAGE>This is a table. It fills up soul gems.Technical(the stuff I need help with):I want to do this:You activate the table, and a messagebox menu pops up. You select the option you want (petty/common/grand, etc).The script checks for the item(unfilled gem) in question, removes it, and adds a corresponding filled gem.In the process, the player loses health, magicka and suffers health regen debuff for t seconds.of course, if you lack the magicka or gems, nothing happensif you lack the correct amount of health, you die.I know how to do this:register the OnActivate eventcheck the conditions, remove/add necessary itemsCode: Message Property MMenu00 autoMiscObject Property gem01 autoMiscObject Property gem01f autoMiscObject Property gem02 autoMiscObject Property gem02f autoint Property aiButton autoEvent OnActivate(ObjectReference akActionRef) aiButton = 0 ;clean initialize aiButton = MMenu00.show() if (aiButton == 0) ;go back Elseif (aiButton == 1);lesser if (akActionRef.GetItemCount(gem01) >= 1 && akActionRef.GetAV("magicka")>= 40) akActionRef.removeitem(gem01) akActionRef.additem(gem01f) ;<damage health, magicka, health regen> endif Elseif (aibutton == 2);common if (akActionRef.GetItemCount(gem02) >= 1 && akActionRef.GetAV("magicka")>= 60) akActionRef.removeitem(gem02) akActionRef.additem(gem02f) ;<damage health, magicka, health regen> endif <two more cases go here, but I wanted to make this short so you don't need to read extra stuff.>EndifEndEventI want to know this:How do I damage the player in the ways I mentioned earlier? I would like it to be lore friendly, so there's a little sound, a little light, etc. I think this can be done w/ magic effects, but I am clueless about implementation.Lore(suggestions welcome):The main concept here is that a portion of your soul is "eaten up" by corrosive magic, and said portion fills up the gems. You can't fill black gems, because a black gem is filled by a full, human soul. Animal/creature souls are worth far less, and as such, a portion of the Dragonborn's soul is sufficient.It's part of a bigger mod, just saying. Also, maybe I'll add a spell that brings up this menu from anywhere, so you don't need the table. Edited April 8, 2017 by dlobo1999 Link to comment Share on other sites More sharing options...
steve40 Posted April 5, 2017 Share Posted April 5, 2017 Make a spell (or spells) that damages the player for x seconds.use the script to cast the spell on the player. mySpell.Cast(self, akActionRef) There are plenty of examples on how to make spells and magic effects out there. http://www.creationkit.com/index.php?title=Spellhttp://www.creationkit.com/index.php?title=Effect_Itemhttp://www.creationkit.com/index.php?title=Magic_Effecthttps://www.youtube.com/watch?v=E7ikxJJcVG4 Link to comment Share on other sites More sharing options...
dlobo1999 Posted April 5, 2017 Author Share Posted April 5, 2017 Thanks, I'll try that. Link to comment Share on other sites More sharing options...
dlobo1999 Posted April 5, 2017 Author Share Posted April 5, 2017 Make a spell (or spells) that damages the player for x seconds.use the script to cast the spell on the player. mySpell.Cast(self, akActionRef) There are plenty of examples on how to make spells and magic effects out there. http://www.creationkit.com/index.php?title=Spellhttp://www.creationkit.com/index.php?title=Effect_Itemhttp://www.creationkit.com/index.php?title=Magic_Effecthttps://www.youtube.com/watch?v=E7ikxJJcVG4 Tried it. For some reason, I can't get the spell right... Do you know how I can apply a poison instead? That looks easier. Link to comment Share on other sites More sharing options...
dlobo1999 Posted April 8, 2017 Author Share Posted April 8, 2017 [RESOLVED]The issue was fixed by adding a custom potion with negative (poisonous) effects.NOTE: it is not tagged as a poison in the CK, and can be drunk by the player. Game.GetPlayer().EquipItem(poisonref) This line of code did the job. Link to comment Share on other sites More sharing options...
Recommended Posts