Jump to content

In Need of Help With a Script


wardminator

Recommended Posts

I am trying to make another exit/entrance to Gomorrah for a Penthouse that sits atop Gomorrah overlooking the strip. The Penthouse is open so in reality, the character is in TheStripWorldNV cell. That means they must exit Gomorrah, and then re-enter Gomorrah in order to leave. That brings me up and issue with the removing and re-equipping of weapons when you enter and leave. Testing has proven that the issue has to be addressed due to multiple CTDs while moving around Gomorrah. My idea is to set up a mirror of the main Gomorrah entrance for the Penthouse that works independently of one other. I have tried re-scripting the door, but the GECK refuses to save the script. Ever since the patch, the GECK no longer gives any error messages when you go to save the script, so I am left with a guessing game. I have tried running through the Script Validator that is linked to the GECK page, but the Validator finds multiplt errors in the original script as well. All items,markers, triggers and NPCs that need to be in the script have already been placed in the cells. All that is left is the scripting which is giving me fits. Can anyone look at this script and give some suggestions on what needs to be changed?

 

scn PenthouseElevatorDoorScript

 

ref Follower1

ref Follower2

float fTimer

int bActivate

ref rActor

 

begin onActivate

set rActor to GetActionRef

if (GetActionRef == Player && (this == PenthouseElevatorDoor02))

if (vGOMEntranceGuard2REF.GetFactionRelation Player != 1 && vGOMEntranceGuard2REF.GetDead == 0)

disableplayercontrols

endif

;Player.MoveTo vGomPlayerEnterMarker2

;Autosave

Activate

Return

endif

if IsActionRef Player

;showwarning "Interior Door, should only activate when inside"

enableplayercontrols

set vdialoguegomorrah.iWeaponAlert to 0

set vDialogueGomorrah.bGunsAllowed to 0

if vDialogueGomorrah.iPlayerRemFaction == 1

player.addtofaction OmertaFaction 0

set vDialogueGomorrah.iPlayerRemFaction to 0

endif

if vDialogueGomorrah.iInGomorrah == 0

Player.Moveto vGomPortMarker2

vGOMEntranceGuard2REF.ResetAI

return

endif

if vDialogueGomorrah.iInGomorrah >= 1

set vDialogueGomorrah.iInGomorrah to 0

vGOMPlayerEquipmentContainer.removeallitems player

set Follower1 to PenthouseExitTriggerREF.Follower1

set Follower2 to PenthouseExitTriggerREF.Follower2

if Follower1 != 0

vGOMCompanion1EquipmentContainer.RemoveAllItems Follower1

set PenthouseExitTriggerREF.Follower1 to 0

endif

if Follower2 != 0

vGOMCompanion2EquipmentContainer.RemoveAllItems Follower2

set PenthouseExitTriggerREF.Follower2 to 0

endif

endif

Activate

set bActivate to 1

elseif (rActor.GetPlayerTeammate && (this == PenthouseElevatorDoor02))

rActor.moveto vGomCompanionEnterMarker2

else

Activate

endif

end

 

begin GameMode

if bActivate == 1

set fTimer to fTimer + GetSecondsPassed

if fTimer >= .5

set bActivate to 0

set fTimer to 0

if vGomEntrancEGuard2Ref.GetDead == 0

vGomEntranceGuard2Ref.MoveTo VGOMEntranceGuardMarker2

vGOMEntranceGuard2REF.ResetAI

endif

if Follower1 != 0

vGOMCompanion1EquipmentContainer.RemoveAllItems Follower1

set PenthouseExitTriggerREF.Follower1 to 0

endif

if Follower2 != 0

vGOMCompanion2EquipmentContainer.RemoveAllItems Follower2

set PenthouseExitTriggerREF.Follower2 to 0

endif

endif

endif

end

 

Any help would be appreciated. I would name my first born after you, but it is about 15 years too late for that.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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