Jump to content

Forcing an object or animation to spawn at ground level


llocke1127

Recommended Posts

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)

endEvent

The 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

Link to comment
Share on other sites

Maybe you could create a TargetLocation Effect (similar to a rune spell) to place your blood pool.
Not really sure of a way to implement it or if it'll work without first doing some research and testing.

There really isn't a simple papyrus function to get the collision of the ground surface (at least that I'm aware of).
Most time I've used an effect to find the ground collision to get the Z Position of where to move something to.

When using DropObject you could also SetMotionType after the dropped object 3D is loaded to make it settle to the ground (providing the object model has havok set and there's nothing with collision between the ground and the object).

Edited by sLoPpYdOtBiGhOlE
Link to comment
Share on other sites

I understand that you'd probably like to create the mod yourself, but a happy alternative would be to use this http://www.nexusmods.com/skyrim/mods/60/?. There are optionals in the NMM/Mod Organizer installer to have quite a bit more blood. Also, the textures are better and I'm pretty sure the blood comes out better as well (On weapon slice and also after they're dead, I think it seeps out as well).

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...