oddlittleturtle / ccupfo4

Repository for Creation Club Unofficial Patch issue tracking and source scripts
0 stars 0 forks source link

Tesla Cannon: Virgil aggros when hit by Gunner Pipboy Cloak spell #1

Closed oddlittleturtle closed 11 months ago

oddlittleturtle commented 11 months ago

Virgil is set in DN053_VirgilFaction and removed from the faction when the perk spell hits him. Set him to ignore friendly hits and force him back into the faction until the correct time.

oddlittleturtle commented 11 months ago
    ;bug # 000000 - Magic cloak effect knocks Virgil out of his friendly Faction
    bool DN053SuicideStageDone = DN053.IsStageDone(40) ; Virgil's suicide stage
    bool CCPipboyInspectStage = ccBGSFO4046_BestOfThree.IsStageDone(6) ; stage that directs player to pick up gunner's pipboy

    if (Game.GetPlayer().IsInLocation(VirgilsLabLocation))
        if ( CCPipboyInspectStage && !DN053SuicideStageDone )
            ; force him into his faction if he's out of it and hasn't gone suicidal
            Virgil.GetActorReference().AddToFaction(DN053_VirgilFaction)

            ; remind him that you can hit him if you're in his faction
            Virgil.GetReference().IgnoreFriendlyHits(true)
        endif
    endif

Fixed. Cannot fix for PlayStation.