Jump to content

Body Disappear after death Script


morismark

Recommended Posts

Hi at all,

I would that an NPC I built, disappear when he dies.

This is the script that I've applicated in Papyrus Scripts Section, but it doesn't work:

 

Scriptname UnableBodyDeathScripts extends Actor

Event OnDeath(Actor akKiller)
Self.Disable()
EndEvent

 

 

Thanks at all

Link to comment
Share on other sites

I don't know. The syntax is correct. Alternatively you can call Delete() which will remove the reference from the game entirely. Disable just removes the 3D but the reference is still there.

 

Google Translate(assuming you're italian like your profile states):

 

Non lo so. La sintassi è corretta. In alternativa puoi chiamare Delete () che rimuoverà completamente il riferimento dal gioco. Disabilita rimuove solo il 3D ma il riferimento è ancora lì.

Link to comment
Share on other sites

 

 

 

 

Google Translate(assuming you're italian like your profile states):

 

You are really kind , thanks.

 

with your suggest, I've tried:

 

Scriptname UnableBodyDeathScripts extends Actor

Event OnDeath(Actor akKiller)
Self.Delete()
EndEvent

 

 

do not work

 

 

 

Scriptname UnableBodyDeathScripts extends Actor

Event OnDying(Actor akKiller)
Self.Delete()
EndEvent

do not work.

 

 

I think I wrong something. I'm not expert, but I Know that's a very simple script.

I've an actor (not Vanilla. I created) that has a template one (that I've created too) with Miraak outfit.

this actor, has a spell in spelllist, with magic effect that teleport him randomly during combat.

Could this magic effect, interfere with "UnableBodyDeathScripts"?

 

I've implemented the "UnableBodyDeathScripts" at first in the template actor, than in "derived actor".

But theese two attempts are failed.

 

p.s. sorry for my bad english

Edited by morismark
Link to comment
Share on other sites

Does the actor have an enable parent attached?

no there aren't.

 

I've tried dragonactor (vanilla script) on this NPC I've created, not the template but simply the derived, and in proptery compiled all autofill, it works well. My NPC after death, decomposes like a dragon, my player absorb soul dragon, but the NPC disappear only head, legs and hands. If it disappear the rest of the body, it will be great.

Edited by morismark
Link to comment
Share on other sites

Ok I solved.

I've unchecked "use script" in Template data in the Actor tab. The script I've created is in Papyrus Scripts, it isn't spell, magic effect or other in spellist.

For help other user: the script is:

Scriptname UnableBodyDeathScripts extends Actor
{Unable body after Death}

Event OnDeath(Actor akKiller)
       Self.Delete()
EndEvent

I

But it remains a mystery.

If "use script" were checked, dragonactor script works but mine one, no. I think even dragonactorscript it should have worked.

I don't know.

 

 

THANKS RichWebster and The Arbiter of Time!

Edited by morismark
Link to comment
Share on other sites

Ok, Now I would extend my script.

 

I want two steps:

1) on dyingdeath event I would all animation of dragon death

2) on death event I would the master explosion firestorm and body disappear.

 

So I taken the dragon death script and implementend in this one, my script.

But when I kill this NPC, it start the dragon death animation but it lasts one second and than the body disappear. I unerstand why, so I've created two States, but dying time don't cover all animation, and quickly start the death (with body disappear):

 

Scriptname mORISexplosionScript extends Actor  
{esplosione dopo morte}

import game
import debug
import utility

event OnDying(Actor akKiller)
	RegisterForUpdate(1)
	gotoState("waiting")
endEvent

STATE waiting

event OnUpdate()
	if GetDistance( GetPlayer() ) < TriggerDistance 
		trace("DragonDeathScript: player close enough, trigger death sequence")
		gotoState("done")
		UnRegisterForUpdate()
		(MQKillDragon as MQKillDragonScript).DeathSequence(self)
	endif
endEvent

endSTATE

STATE done

Event OnDeath(Actor akKiller)
	Self.placeAtMe(AtronachFlameDeathExplosion)
	Self.Delete()
EndEvent

endSTATE

int Property TriggerDistance = 1000 Auto
{trigger distance for the powerup sequence}

Quest Property MQKillDragon Auto

Explosion property AtronachFlameDeathExplosion Auto 
Edited by morismark
Link to comment
Share on other sites

I'm sorry I don't know if I have understand.

 

During npc "dying", I like all vanilla dragon death animation, is perfect.

After NPC dying (that during about one second, from the Npc last breath to when he falls down), I have understood that Skyrim game, start the "death" event.

So when the body is death i would implement an explosion (the effect isn't important because, I can change it in proptery script), and the "self.delete" to body disappear.

 

So if I understand correctly your suggest,

I should use only FX effect "on.dying event", and not dragon actor script,and on death event,does the explosion and self.disable? Is it correct?

 

Thanks

Link to comment
Share on other sites

  • Recently Browsing   0 members

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