Ex0rdium Posted September 28, 2015 Posted September 28, 2015 I need some help to write an Ondeath script, so when I kill a specific NPC, it will make the Player Essential and enter into bleedout instead of being able to be killed. Im definitely an amateur when it comes to scripting, and have tried dissecting various mods and investigating the wiki to try and figure it out, my sadly I cannot get it. Any help would be appreciated. (And then of course writing a script to make the player un-essential again as well)
DarthWayne Posted September 29, 2015 Posted September 29, 2015 You cant make an actor essential with a script. Only thing you could do is increase the hp of the player when it goes below a limit or try to resurrect the player after he got killed.
sLoPpYdOtBiGhOlE Posted September 29, 2015 Posted September 29, 2015 You can make an Actor essential via script, but SetEssential is applied only to the ActorBase.So it would effect any other actor that is using that ActorBase as well.http://www.creationkit.com/SetEssential_-_ActorBase So providing your Actor is Unique, which the player is, then it would work fine.
Ex0rdium Posted September 30, 2015 Author Posted September 30, 2015 I agree, you can make the Player essential. There is another mod that actually does it, but gets very complicated with the scripting because of what the mod entails, so I had a very difficult time trying to dissect it. Ive seen that in the wiki about setessential to the actor base. My problem is I dont understand how this looks when putting the whole script together, with the "extends to", and the "Auto", etc. Again I am very amateur at this, and am trying to learn and understand it. The most I am really able to do are ondeath, onopen, ontriggerenter, etc. scripts that enable or disable items. But I am having a difficult time understanding how to write something that affects the actorbase.
sLoPpYdOtBiGhOlE Posted September 30, 2015 Posted September 30, 2015 (edited) All I can suggest is to start at the beginning and work from there.I know it not what you want to do, but you've got to learn to crawl before you walk.Start with:http://www.creationkit.com/Bethesda_Tutorial_Papyrus_Hello_WorldThen continue on with the basic tuts.After you've done them (not skimmed them or skipped to the end) you will understand "extends" and "Auto" or at least what they relate to.You will also understand what a property is and more.Then you will be able to do that basic task your trying to do. Edited September 30, 2015 by sLoPpYdOtBiGhOlE
Colev0 Posted October 2, 2015 Posted October 2, 2015 I believe you might be able to make the player essential by attaching them to an alias in a quest. Look at this: http://www.creationkit.com/Quest_Alias_Tab You should be able to check the box that says "Essential" for a quest alias you create yourself. Then direct the alias towards the player by clicking on "Forced Reference" and selecting the PlayerREF object reference (found in any cell in the vanilla game). This, of course, assumes you've set up a quest that knows when to place the player into the quest alias in order to make them essential, and take them out again once they no longer need to be immortal. Do you know how to do that?
sLoPpYdOtBiGhOlE Posted October 2, 2015 Posted October 2, 2015 (edited) At this line of the ops response My problem is I dont understand how this looks when putting the whole script together, with the "extends to", and the "Auto", etc. Without the basic fundamentals of understanding things such as declaring a property or the very start of what the script extends...So using ForceRefTo() and Clear() in a script attached to the quest or anything, will beyond the ops scope untill he/she does some reading. Edited October 2, 2015 by sLoPpYdOtBiGhOlE
Ex0rdium Posted October 2, 2015 Author Posted October 2, 2015 Ok. Please dont hate me. Im a moron. But I could of had it working the whole time. I ummmm, kind of had the mod Everyone Killable turned on. :confused: I have it working by marking 'The Player' as essential as a quest alias.(which I originally tried, but sadly..........Everyone Killable...... :blush: ) I also can have it working with script. I have tested with an Ondeath script ive placed it on an NPC, also even an OnOpen script I put on a door. I will share the script if anyone is interested. One thing is, when I enter bleedout, I stay in bleedout, and wont exit it unless I use a potion to cure myself. After that if I enter bleedout again, Im immediately healed right away. Weird By the way, I said I was amateur with scripting, I didnt say I was completely ignorant of it all. Personally for me if someone asked for help in an area, I would show them what needed to be done, and then explain why each component does what it does, especially with something that was really as simple as this. But thats just me.
Recommended Posts