Jump to content

(help) crash when player is beheaded


Delzaron

Recommended Posts

Hi

 

I meet an interesting problem.

 

I'm using an adaptation of a executionblock script : it allow to behead the player.

 

Here's the beast :

 

Scriptname aNovel_ExecuttionnerChoppingBlockScr extends ObjectReference  

import utility
import Debug

ObjectReference executionerActor = None
ObjectReference executioneeActor = None
ObjectReference executionGuardActor = None

Spell Property TiedUpPrisonerTracker Auto

Idle property IdleHeadChop auto
{This is the idle that the executionee will play when everything is ready.}

Keyword property executionerKeyword auto
{The keyword that designates the executioner from the soon to be dead.}

Keyword property executionGuardKeyword auto
{The keyword that designates the executioner from the soon to be dead.}

;*****************************************

auto STATE readyToChop

Event OnActivate( ObjectReference akActionRef )
    if(akActionRef.HasKeyword(executionerKeyword))
        executionerActor = akActionRef
    elseif(akActionRef.HasKeyword(executionGuardKeyword))
        executionGuardActor = akActionRef    
    else
        ;if(akActionRef == Game.GetPlayer())
        ;    Game.ForceFirstPerson()
        ;endif
        (akActionRef as Actor).SetRestrained(true)
        (akActionRef as Actor).GetActorBase().SetEssential(false)
        (akActionRef as Actor).RemoveSpell(TiedUpPrisonerTracker)    
        executioneeActor = akActionRef
    endif
    
    ;if it's ready, then do the chop!
    if (executioneeActor != none && executionerActor != none && executionGuardActor != none)
        gotoState("chopping")
        RegisterForSingleUpdate(0.5)
    endif
endEvent

endState

STATE chopping
    ; do nothing for now
endState

Event OnUpdate()
    ;if it's ready, then do the chop!
    if ( executioneeActor != none && executionerActor != none)        
;        Debug.Notification("CHOPPING START" )
        wait(0.5)

        ;set up the relationship
        if ( !executioneeActor.AddDependentAnimatedObjectReference( executionerActor ) || !executioneeActor.AddDependentAnimatedObjectReference( executionGuardActor ) )
            Notification( "dependence broken." )
        endif
        
        ;play the idle and wait..
        Actor myExecutionee = executioneeActor as Actor
        Actor myExecutioner = executionerActor as Actor

        if(!myExecutionee.PlayIdle(IdleHeadChop))
             Debug.Notification(self+ " play idle failed")
            if(myExecutionee == Game.GetPlayer())
                Debug.SetGodMode(false)
            endif
            myExecutionee.KillEssential(Game.GetPlayer())
            myExecutionee.EndDeferredKill()    
        else
;            Debug.Notification(self+ " play idle suceess")
            Wait(2.0)
            executioneeActor.RemoveDependentAnimatedObjectReference( executionerActor )
            executioneeActor.RemoveDependentAnimatedObjectReference( executionGuardActor )
            executioneeActor = None
            
            if(myExecutionee == Game.GetPlayer())
                Wait(10.0)
            else
                Wait(16.0) ; need some extra time for the anim to finish pushing the previous victim away.
            endif
            if(!myExecutionee.IsDead()) ; incredibly, decapitation doesn't actually kill the victim
                if(myExecutionee == Game.GetPlayer())
                    Game.TriggerScreenBlood(10)
                    Debug.SetGodMode(false)
                endif
                myExecutionee.KillEssential(Game.GetPlayer())
                myExecutionee.EndDeferredKill()
            endif
        endif
        ;Continue executions
        ;Now clean up.  Set the executionee to NULL, since he's no longer needed...
        gotoState("readyToChop")
     ;    Debug.Notification("CHOPPING END" )
    endif
endEvent

 

 

In game, everything is ok since the axe fall the player neck. At this point, I got a CTD... and I wish to know the explanation...

Link to comment

Maybe you can ask Zaira. Lots of beheading in Maria Eden.

As far as i understand it, he uses a clone that looses his head

 

Is there a cloning command in this game? I know Oblivion had "createfullactorcopy" in the console commands, but I thought that function was gone in Skyrim.

Link to comment

 

Maybe you can ask Zaira. Lots of beheading in Maria Eden.

As far as i understand it, he uses a clone that looses his head

 

Is there a cloning command in this game? I know Oblivion had "createfullactorcopy" in the console commands, but I thought that function was gone in Skyrim.

 

i guess its not this:=D

 

 

=D

 

or this? http://www.nexusmods.com/skyrim/mods/63280/?

 

my knowledege about the technique behind this is quite nonexistent, so dont be shy and ask the one of those beheading modders like zaira or maybe even the the guy that made the Death Alternative - Captured Mod: http://www.nexusmods.com/skyrim/mods/54867/?

you can get beheaded by the Thalmor there, without CTD

Link to comment

Once I ran into the crash problem when using DA-Captured mod where player got beheaded. I disabled the face overlay in RaceMenu and it won't crash any more when being beheaded. However, disabling the face overlay will make Sexlab's face expression, SlaveTat's Face tattoo and many other things that depends on face overlay not able to work. I haven't met a perfect solution to this issue.

 

Link to comment

You can create an actor that is a copy of the player with:

 

Actor Property playerRef Auto

 

Actor theClone = PlayerRef.placeAtMe(PlayerRef, 0, 0, 0, true)

 

But it will not look exactly the same.

 

Beheading a clone is not a problem. But you need to lock first person view and disable the hands. So it will look like a camera. And when you are done: PlayerRef.kill(PlayerRef)

 

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use