mistery issue 22: wrong way fox...

Post » Wed Mar 25, 2015 12:40 am

...and here's the second odd issue i'm stuck with:

the seemingly simple task would be to move a fox to an xMarkerHeading inside a cage (where he does run his sandbox pack at the marker ref)

for some reason though, no matter what i do, he always ends up in his cage in a 180° angle from what he should.

no MoveTo parameters, no setangle or anything i could come up with could change this.

maybe somebody can see if anything i do in the script could cause this?

the relevant part is in the OnInit block (where lots of stuff gets done to the "Snoop"-actor), i'm pretty sure the rest can be ignored, still posting the whole script in case it's some event interference

Spoiler
Scriptname s7oDK01aliasPetSnoopSCRIPT extends ReferenceAlias  Quest                                Property    QuestS21petSnoop                AutoFaction                                Property    PetFaction                        AutoFaction                                Property    PetFriendFaction                AutoFaction                                Property    PetSalesFaction                    AutoFaction                                Property    DonkeyKingFaction                AutoFaction                                Property    CaptiveFaction                    AutoObjectReference                    Property    S21markerSnoopCage            AutoActor                                Property    Snoop                            Auto    HiddenActor                                Property    PlayerRef                        Auto    HiddenFaction                                Property    PlayerFaction                    Auto    Hiddens7oDK01questDonkeyKingSCRIPT    Property    DonkeyKingSCRIPT                Auto    HiddenObjectReference                    Property    SnoopHome                        Auto    HiddenBool                                            IsPlayerPet; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -; - - - - - - - - - - - - - - - - - - - -        E V E N T S        - - - - - - - - - - - - - - - - - - - -; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Event OnInit ()    if GetOwningQuest ().IsRunning ()        DonkeyKingSCRIPT                = ( GetOwningQuest ()             as s7oDK01questDonkeyKingSCRIPT )        PlayerFaction                    = ( DonkeyKingSCRIPT.            PlayerFaction as Faction )        PlayerRef                        = ( Game.GetPlayer ()             as Actor )        if GetRef ()            Snoop                        = ( GetRef ()                    as Actor )            if Snoop.GetLinkedRef ()                SnoopHome                = ( Snoop.GetLinkedRef ()        as ObjectReference )            endif            PetFaction.                    SetAlly                            ( DonkeyKingFaction, false, false )            if PetFriendFaction                PetFaction.                SetAlly                            ( PetFriendFaction,     true, true )            endif            if ( QuestS21petSnoop.GetStage () < 100 )                Snoop.                    GetActorBase ().                SetProtected ( true )                Snoop.                    AddToFaction                    ( CaptiveFaction )                Snoop.                    AllowPCdialogue                    ( true )                Snoop.                    Disable                            ( false )                Snoop.                    MoveTo                         ( S21markerSnoopCage, 0, 0, 0, true )                Snoop.                    Enable                            ( false );                Snoop.                    EvaluatePackage                ()                RegisterLos                 ()            endif        endif    endifendEventEvent OnActivate ( ObjectReference akActionRef )    if ( akActionRef == ( Snoop as ObjectReference ) )        PCpetFaction ( true )    elseif ( PetSalesFaction && ( QuestS21petSnoop.GetStage () >= 900 ) )        if ( ( akActionRef == PlayerRef ) && ( PlayerRef.IsInFaction ( PetSalesFaction ) && !Snoop.IsInFaction ( PlayerFaction ) ) )            DonkeyKingSCRIPT.        PetSelect     ( Snoop, PetSalesFaction )            PCpetFaction            ( true )        endif    endifendEventEvent OnUnload ()    if ( Snoop.IsDead () && !Snoop.IsDisabled () )        Clear     ()        Snoop.    Disable    ()        Snoop.    Delete     ()    endifendEventEvent OnLocationChange ( Location akOldLoc, Location akNewLoc )    if ( akNewLoc == Snoop.GetEditorLocation () )        if ( PetSalesFaction && ( QuestS21petSnoop.GetStage () >= 900 ) )            if ( !IsPlayerPet && !Snoop.IsInFaction ( PlayerFaction ) )                if ( ( Snoop.GetFactionOwner () != PetSalesFaction ) && ( Snoop.GetFactionOwner () != PlayerFaction ) )                    Snoop.                    SetFactionOwner     ( PetSalesFaction )                    Snoop.                    AddToFaction         ( DonkeyKingFaction )                    DonkeyKingSCRIPT.        PetRegister             ( Snoop, 1, false )                endif            endif        endif    endifendEventEvent OnGainLos ( Actor akSource, ObjectReference akTarget )    if ( QuestS21petSnoop.GetStage () < 200 )        if ( ( ( akSource == PlayerRef ) && ( akTarget == Snoop ) ) || ( (  akSource == Snoop ) && ( akTarget == PlayerRef ) ) )            QuestS21petSnoop.            SetStage ( 200 )        endif    endifendEventEvent OnPackageChange ( Package OldPack )    if ( QuestS21petSnoop.GetStage () >= 900 )        if Snoop.IsInFaction ( CaptiveFaction )            Snoop.        RemoveFromFaction     ( CaptiveFaction )        endif    endif    if ( IsPlayerPet && !Snoop.IsInFaction ( PlayerFaction ) )        PCpetFaction    ( false )    endifendEventEvent OnDeath ( Actor akKiller )    UnregisterLos             ()    if ( akKiller == PlayerRef )        Debug.Notification     ( "You killed Snoop the Fox" )    elseif IsPlayerPet        Debug.Notification     ( "Snoop the Fox has died" )    endif    if Snoop.IsInFaction ( PlayerFaction )        Snoop.                RemoveFromFaction ( PlayerFaction )        DonkeyKingSCRIPT.    PetCount -= 1    elseif ( PetSalesFaction && ( Snoop.GetFactionOwner () == PetSalesFaction ) )        DonkeyKingSCRIPT.    PetRegister             ( Snoop, -1, false )    endif    PCpetFaction             ( false )endEvent; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -; - - - - - - - - - - - - - - - - - - - -   F U N C T I O N S   - - - - - - - - - - - - - - - - - - - -; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Function PCpetFaction ( Bool CheckIn )    if CheckIn        if !IsPlayerPet            IsPlayerPet    = true            if !PlayerRef.IsInFaction ( PetFaction )                PlayerRef.    AddToFaction ( PetFaction )            endif            PlayerRef.        SetFactionRank ( PetFaction, ( PlayerRef.GetFactionRank ( PetFaction ) + 1 ) )        endif    else        if ( IsPlayerPet && !Snoop.IsInFaction ( PlayerFaction ) )            IsPlayerPet        = false            PlayerRef.        SetFactionRank ( PetFaction, ( PlayerRef.GetFactionRank ( PetFaction ) - 1 ) )            if ( PlayerRef.GetFactionRank ( PetFaction ) <= 0 )                PlayerRef.    RemoveFromFaction    ( PetFaction )            endif        endif    endifendFunctionFunction RegisterLos ()    RegisterForSingleLosGain     ( Snoop,     PlayerRef )    RegisterForSingleLosGain    ( PlayerRef,    Snoop )endFunctionFunction UnregisterLos ()    UnregisterForLos             ( Snoop,     PlayerRef )    UnregisterForLos            ( PlayerRef,    Snoop )endFunction

User avatar
Emma Pennington
 
Posts: 3346
Joined: Tue Oct 17, 2006 8:41 am

Return to V - Skyrim