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...

Forcing an object or animation to spawn at ground level


llocke1127
 Share

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...