Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

llocke1127

Allies
  • Posts

    5
  • Joined

  • Last visited

llocke1127's Achievements

Layman

Layman (1/11)

0

Reputation

  1. Hi, I have a supposedly very simple script. I want to create a pool of blood (animated or unanimated) to spawn at GROUND LEVEL at the body of a dead actor during a Kill Actor Event. ---------------------------------------------------------------------------------------------------------------- First, let me describe what I believe to be the root of the issue. I want to use an animated object for the purposes of this script. I have gone through *every* variable available in the script properties, from Action to WorldSpace, and I simply cannot find the animated objects I want to reference. I put a band-aid fix on the problem by taking a MiscObject (deerhide, for example) and replacing the .nif with the desired static or animated object's .nif. The MiscObject before the .nif change will function properly with the below scripts (gravity will make it "fall" to ground level and stay put); however, when I change the .nif to the desired animation or static graphic, the object will "stick" in mid air wherever it was called into existence by the script. No amount of .forceaddragdolltoworld() or .applyhavokimpulse() will make the thing move. ---------------------------------------------------------------------------------------------------------------- I have figured out several ways of popping the item I want into existence (pool of blood), but the object will either float in the air where my dagger struck the victim dead, or it will spawn at the waistline of the victim and become a permanent unmovable fixture in the room. Scenario 1: Quest Driven Using the Kill Actor Event, I can create 1 alias to reference the victim of the event, and a second alias to reference an object (BloodPool) to spawn "AT" the victim. This creates a permanent "BloodPool" object floating in the air where the victim initially died. Scenario 2: DropObject Script Scriptname deathblood1 extends activemagiceffect Armor Property BleedoutEffect Auto MiscObject Property DeathBloodPool Auto Event OnEffectStart(Actor akTarget, Actor akCaster) akTarget.EquipItem(BleedoutEffect, false, false) Utility.Wait(2.0) akTarget.DropObject(DeathBloodPool) Utility.Wait(10.0) akTarget.UnEquipItem(BleedoutEffect) endEvent This script will force the victim to drop the pool of blood 2 seconds after dying (presumably having the actor at ground level), however the DropObject function will drop the object from the actor's chest level, whether that actor is standing on his head or 10 feet underwater, it will spawn the blood pool into existence at 4.5 ft above ground level, freezing the object in place and making the blood pool a permanent part of the background. Scenario 3: PlaceAtMe script Scriptname deathblood1 extends activemagiceffect Armor Property BleedoutEffect Auto MiscObject Property DeathBloodPool Auto ObjectReference Pool Event OnEffectStart(Actor akTarget, Actor akCaster) akTarget.EquipItem(BleedoutEffect, false, false) Utility.Wait(2.0) Pool = akTarget.placeatme(DeathBloodPool) Utility.Wait(10.0) akTarget.UnEquipItem(BleedoutEffect) endEventThe Utility.Wait(2.0) makes the blood pool drop in a slightly less ridiculous place than the other 2 scenarios, but the PlaceAtMe function prefers to drop objects at waist level on the victim. The object is as close to the ground as I can manage, however, its still floating half a foot above ground level where I want it. Am I missing something completely obvious here? Any help or input will be greatly appreciated. Thanks
  2. Interesting. Followed these steps and managed everyone to glow, even if they're killed within a second of eachother. The glow doesn't automatically unequip from the actor though - once glowing they glow forever. The quest script ends before the utility.wait(30) can do its business. The next step would be to destroy the item itself. I can run a script [ extends ObjectReference, event OnInit() ], the instant the item Glow01 appears in the world, regardless of who it's on. No matter how many people have Glow01 equipped their onInit() runs unique to each victim. Despite this, removeItem() / dropitem() / destroyitem() / etc. don't work. The item also can't be naturally destoryed through Destructible Item menu. The reference to the victim is also invalid since we quit the quest the instant it equipped Glow01 to the victim. I think we're hitting a dead end on the equip item/unequip item for the glow effect. I'll take another stab at it later using spell effects instead I think. Thanks for all the help and input.
  3. Ok, it makes a lot more sense when you put it that way. I had no idea what an onstorykilled event was, but the links & quick explanation really helped clear that up. I now have a working script that does exactly what I want, which is to equip the glow effect on whatever I kill for 30 seconds. The problem I'm still facing is the quest either: 1. Runs once and done; leaving glow on first kill for 30 seconds and no kills afterward 2. Runs only while another victim isn't glowing; I can kill multiple targets and they glow, I just have to wait for the 30 second script to be done before the quest will start itself up again. Any possible solutions to this you can think of? I've been researching and fiddling all night, but haven't been able to make it run on more than one victim at a time. Thanks for the help
  4. Thanks for the response. I tried adding in a quest + a reference, but nothing seems to trigger the effect still. The reference menu is way too picky to apply to "every" NPC that the player kills. The issues stands that the editor has no conceivable way to target reference whatever NPC i just killed, regardless of race/type/etc. If anyone has a solution for this I'd be grateful, or an easier way to reference NPCs that the player has no relation to other than killing them (leveled bandits for example). Alternatively - I have a glow spell, when cast on target it causes them to glow for 30 seconds, exactly as effect above describes. I've tried adding this as a perk "Cast On HIt" (like bullsye paralyze perk) but it still won't trigger the spell. Is it possible to run a script to fire off the glow spell for anyone who has the Glow01 object in their inventory? Thanks
  5. I'm trying to create a simple effect, but the application isn't really working. Scriptname glowingdeath extends Actor Armor Property Glow01 Auto Sound Property buzzing Auto Event OnDying(Actor akKiller) self.EquipItem(Glow01) nt instanceID1 = buzzing.play(self) Utility.Wait(30.0) self.RemoveItem(Glow01) Sound.StopInstance(instanceID1) endEvent This is the basis of what I want my script to accomplish. When the victim dies, I want a glowing effect to surround them for 30 seconds via an equipped item. It's important that the effect is via equipped item and not using shaders, there will be more to this mod when I work out all the kinks. HOW IT WORKS: The above script works BEAUTIFULLY when applied directly to an NPC's papyrus script. The effect is completely lost when I try to apply it to all actors. HOW IT'S NOT WORKING: To apply to all actors, I modified a simple perk (lighthands pickpocket rank 1) to add the Glow01 object as a leveled loot item to any victim I kill. This works, however, the Glow01 object is NEVER equipped, and I can't find the proper modifiers to equip it to my victims actively. BACKWARDS NON-WORKING SCRIPT: Scriptname glowingdeath extends ObjectReference Armor Property Glow01 Auto Sound Property buzzing Auto Actor Property PlayerREF Auto Event OnInit() PlayerREF.EquipItem(Glow01) int instanceID1 = buzzing.play(PlayerREF) Utility.Wait(30.0) PlayerREF.RemoveItem(Glow01) Sound.StopInstance(instanceID1) endEvent The above code is applied directly to the item, Glow01's papyrus script. When the victim dies, it adds the glow to my character and not my victim. Exactly what I don't want, but from a programmer standpoint, it proves the OnDeath function works when scripted on an equipable item. The first issue is, no matter what I replace PlayerREF with {self akKiller akVictim} I can't find the right value to identify the VICTIM is the one who needs Glow01 equipped, not the player. The second issue is, OnDeath() may not be the proper tool for this job. I've tried several others {OnDying(), OnItemAdded(), OnHit(), a dozen more that I can't recall} and they don't produce any results. SHORT VERSION: A: We can modify above code to force victim actor to equip the item. The problem here is I simply don't know how to reference a victim. B: Find a different event type that will accomplish the same effect. Thanks for your time, and I appreciate any help or advice anyone can offer. Thanks. (edited to fix code format)
×
×
  • Create New...