Jump to content

Someone help me fix that elevator in Outcast Outpost OA plz


Prethorius

Recommended Posts

scn DLC02ElevatorSCRIPT

; this script contrls the elevator on the DLC02VSS01 side of things

short state ; 0 = not running, at top
; 1 = going down
; 2 = not running, at bottom
; 3 = going UP
ref actronaut


begin onActivate

set actronaut to getActionRef

if actronaut == player
if state == 2
set state to 3
DLC02ElevShaft.playgroup backward 0 ; send the elevator back up
DLC02ElevGate.playgroup backward 0 ; raise the little gate
.playgroup forward 0 ; play my little switch anim
else
; do nothing
endif
else
; if not the player
actronaut.activate DLC02VSStoBaileys

endif

end


begin gameMode

if DLC02LD.elevFlag == 1 ; if we're flagged to run by the global var

if state == 0 ; run once to establish correct state
DLC02ElevShaft.playgroup forward 0 ; jump right into running the elevator
DLC02ElevGate.playgroup forward 0 ; lower gate with it.
set state to 1
endif

if DLC02ElevShaft.isAnimPlaying forward == 0 ; when the anim is finished....

set DLC02LD.elevFlag to 0
set state to 2

endif

endif

if state == 3
if DLC02ElevShaft.isAnimPlaying backward == 0
set state to 0
DLC02VSStoBaileys.activate player ; send player through to Bailey's Crossroads
endif
endif

if DLC02ElevShaft.isAnimPlaying forward == 1 || DLC02ElevShaft.isAnimPlaying backward == 1
triggerHitShader 0.1
setRumble 0.15 0.1 0.01 ; going for a low, constant rumble
endif

end

 

This is a script of the elevator which is bugged, I cant find out a mistake in this script, maybe someone can help with it?

 

Problem is that sometimes this elevator is getting stuck at the top when entering area from Bailey's Crossroads

 

I'm pretty sure that's something wrong with this script

If someone can help with solving this problem

Link to comment
Share on other sites

Is there a problem with just posting the script? Here it is for anyone who's interested:

scn DLC02ElevatorSCRIPT

; this script contrls the elevator on the DLC02VSS01 side of things

short state ; 0 = not running, at top
; 1 = going down
; 2 = not running, at bottom
; 3 = going UP
ref actronaut


begin onActivate

set actronaut to getActionRef

if actronaut == player
	if state == 2
		set state to 3
		DLC02ElevShaft.playgroup backward 0 ; send the elevator back up
		DLC02ElevGate.playgroup backward 0 ; raise the little gate
		.playgroup forward 0 ; play my little switch anim
	else
; do nothing
	endif
else
; if not the player
	actronaut.activate DLC02VSStoBaileys

endif

end


begin gameMode

if DLC02LD.elevFlag  == 1 ; if we're flagged to run by the global var
	
	if state == 0 ; run once to establish correct state
		DLC02ElevShaft.playgroup forward 0 ; jump right into running the elevator
		DLC02ElevGate.playgroup forward 0 ; lower gate with it.
		set state to 1
	endif
	
	if DLC02ElevShaft.isAnimPlaying forward == 0 ; when the anim is finished....
		
		set DLC02LD.elevFlag to 0
		set state to 2

	endif

endif

if state == 3
	if DLC02ElevShaft.isAnimPlaying backward == 0
		DLC02VSStoBaileys.activate player ; send player through to Bailey's Crossroads
		set state to 0
	endif
endif	

if DLC02ElevShaft.isAnimPlaying forward == 1 || DLC02ElevShaft.isAnimPlaying backward == 1
	triggerHitShader 0.1
	setRumble 0.15 0.1 0.01 ; going for a low, constant rumble
endif

end

I'll have a look at it and see if I can't figure out the problem. I don't have OA myself, but if I understand you correctly the elevator sometimes becomes stuck in the "at top" position?

 

Cipscis

Link to comment
Share on other sites

The elevator is triggered to descend by the remote variable "DLC02LD.elevFlag". If it's not descending properly then it will be because this variable isn't being properly set to 1, and the problem is not in this script.

 

If you use the "Find Text" function of the GECK to find "elevFlag" in scripts, you'll be able to find which other scripts use a variable of this name - one of them will be where the problem originates from.

 

In the "front end", how is the elevator triggered to descend?

 

Cipscis

Link to comment
Share on other sites

Thx for aiding me sir

 

I did use find text as u recomend and results are:

 

scn DLC02ElevDoorSCRIPT

; this script runs on the DOOR object elevator in bailey's crossroads and sends the player to DLC02VSS01


begin onActivate

if getActionRef == player
	player.scaonactor
	set DLC02LD.elevFlag to 1
	setRumble 0.2 0.1 3
	triggerHitShader 1

;While we're running this block, set any followers to Waiting so they don't wander into Anchorage

		if ( JerichoRef.HasBeenHired == 1 )
			set JerichoRef.Waiting to 1
			set Followers.FollowerWaitingLeaveDay to ( GameDaysPassed + FollowerWaitTime )
		endif
		if ( CharonRef.HasBeenHired == 1 )
			set CharonRef.Waiting to 1
			set Followers.FollowerWaitingLeaveDay to ( GameDaysPassed + FollowerWaitTime )
		endif
		if ( DogmeatRef.HasBeenHired == 1 )
			set DogmeatRef.Waiting to 1
			set Followers.FollowerWaitingLeaveDay to ( GameDaysPassed + FollowerWaitTime )
		endif
		if ( ButchRef.HasBeenHired == 1 )
			set ButchRef.Waiting to 1
			set Followers.FollowerWaitingLeaveDay to ( GameDaysPassed + FollowerWaitTime )
		endif
		if ( CloverRef.HasBeenHired == 1 )
			set CloverRef.Waiting to 1
			set Followers.FollowerWaitingLeaveDay to ( GameDaysPassed + FollowerWaitTime )
		endif
		if ( RL3Ref.HasBeenHired == 1 )
			set RL3Ref.Waiting to 1
			set Followers.FollowerWaitingLeaveDay to ( GameDaysPassed + FollowerWaitTime )
		endif
		if ( MQ08FawkesRef.HasBeenHired == 1 )
			set MQ08FawkesRef.Waiting to 1
			set Followers.FollowerWaitingLeaveDay to ( GameDaysPassed + FollowerWaitTime )
		endif
		if ( StarPaladinCrossRef.HasBeenHired == 1 )
			set StarPaladinCrossRef.Waiting to 1
			set Followers.FollowerWaitingLeaveDay to ( GameDaysPassed + FollowerWaitTime )
		endif





	.activate player
else
	; do nothing
endif

end

 

scn DLC02LDSCRIPT

; shell script for DLC02 level design variables

short MetroTrigged
short RuinsMutsDead

short O1atWP1
short O2atWP1
short O3atWP1

short toRuinsWP

short elevFlag				; flag signals DLC02ElevatorSCRIPT to run

ref checkpoint				; store an xMarkerHeading as the checkpoint to send players back to.

short bombFlareActive
short bombFlareinit
float bombFlareTimer


;// commenting out some prototype script we aren't likely to use.
;begin gameMode
;
;	if bombFlareActive == 1
;
;		if bombFlareInit == 0
;			player.removeItem DLC02TestGun 1
;			set bombFlareTimer to 4
;			set bombFlareInit to 1
;		endif
;
;
;		if bombFlareTimer > 0
;			set bombFlareTimer to (bombFlareTimer - getSecondsPassed)
;		else
;			player.placeAtMe DLC02FXCarpetBomb01
;			set bombFlareActive to 0
;			set bombFlareInit to 0
;		endif
;	endif
;
;end

;////////////
;// variables for the sword
;////////////

;// damage addition level
short elecSwordDamageLevel

;// highest ever level
short elecSwordHighestLevel

;// the timer for the sword
short elecSwordTimer

;// the ref for the person attacked by the sword
ref elecSwordVictimCurrent

;////////////
;// Variables for the Overlook's guns
;////////////

;// the gun's positions
;// 0 - Moving
;// 1 - Right
;// 2 - TurnRight
;// 3 - Left
;// 4 - TurnLeft
;// 5 - Forward(center)
short gunAPos
short gunBPos
short gunCPos

;// tell us if the gun has been fired
short gunAFired
short gunBFired
short gunCFired

;// gun shot timers
float gunAShellTimer
short gunAShellInit

float gunBShellTimer
short gunBShellInit

float gunCShellTimer
short gunCShellInit

;// the explosive has been set!
short gunAExplosiveSet
short gunBExplosiveSet
short gunCExplosiveSet



BEGIN GAMEMODE

;///////////
;// make sure on death the camps get set properly
;///////////

;// the ice camp
IF DLC02ChineseIceCampSetOnceXMRK.getDisabled == 1 && DLC02StrikeTeam.CCampCounter == 0 && DLC02StrikeTeam.STCampDone == 0
	;// set the quest script to done, flip the flags
	set DLC02StrikeTeam.STCampDone to 1
	setStage DLC02StrikeTeam 200

ENDIF

;// the mines
IF DLC02ChineseMinesSetOnceXMRK.getDisabled == 1 && DLC02StrikeTeam.CMineCounter == 0 && DLC02StrikeTeam.STMinesDone == 0
	;// set the quest script to done, flip the flags
	set DLC02StrikeTeam.STMinesDone to 1
	setStage DLC02StrikeTeam 200

ENDIF
END

 

scn DLC02ElevSwitchAboveSCRIPT

; brute force script here....

;update: clear crime against DLC outcast faction the first time the player uses the elevator

short ClearOnce


begin onActivate

if getActionRef == player
	set DLC02LD.elevFlag to 1

	if ( ClearOnce == 0 )
		if ( DLC02OA1.OutcastsHostile == 0 )
			DLC02DefenderSibleyRef.ClearActorsFactionsPlayerEnemyFlag 
			set ClearOnce to 1
		endif
	endif
	DLC02ElevAboveDoorREF.activate player

endif

end

 

The problem appear only when I use the switch or the lift fence above the base (top) It teleport me to the lift and sometimes its get stuck

Link to comment
Share on other sites

The first script, "DLC02LDSCRIPT", declares the "elevFlag" variable but doesn't affect it in any way.

 

The second script, "DLC02ElevSwitchAboveSCRIPT", sets "elevFlag" to 1, which causes the elevator to descend if it is currently at the top, when the reference which it is attached to is activated by the player.

 

The third script, "DLC02ElevDoorSCRIPT", also sets "elevFlag" to 1 when the reference which it is attached to is activated by the player.

 

These scripts all seem to set "elevFlag" to 1 in the correct manner, so I guess the problem must be with the original script. This script seems to handle "elevFlag" correctly, so the issue is probably with the other variable that it uses in its condition here - "state". For the elevator to descent, "state" must be set to a value of 0. The only place in which this occurs is right after the player is forced to activate "DLC02VSStoBaileys", which sends them to a new cell. It could be that sending the player to a new cell like this before "state" is set to 0 is causing the GameMode block to stop running before the "set" command is executed.

 

Try swapping the lines around like this:

scn DLC02ElevatorSCRIPT

; this script contrls the elevator on the DLC02VSS01 side of things

short state ; 0 = not running, at top
; 1 = going down
; 2 = not running, at bottom
; 3 = going UP
ref actronaut


begin onActivate

set actronaut to getActionRef

if actronaut == player
	if state == 2
		set state to 3
		DLC02ElevShaft.playgroup backward 0 ; send the elevator back up
		DLC02ElevGate.playgroup backward 0 ; raise the little gate
		.playgroup forward 0 ; play my little switch anim
	else
; do nothing
	endif
else
; if not the player
	actronaut.activate DLC02VSStoBaileys

endif

end


begin gameMode

if DLC02LD.elevFlag  == 1 ; if we're flagged to run by the global var
	
	if state == 0 ; run once to establish correct state
		DLC02ElevShaft.playgroup forward 0 ; jump right into running the elevator
		DLC02ElevGate.playgroup forward 0 ; lower gate with it.
		set state to 1
	endif
	
	if DLC02ElevShaft.isAnimPlaying forward == 0 ; when the anim is finished....
		
		set DLC02LD.elevFlag to 0
		set state to 2

	endif

endif

if state == 3
	if DLC02ElevShaft.isAnimPlaying backward == 0
		set state to 0
		DLC02VSStoBaileys.activate player ; send player through to Bailey's Crossroads
	endif
endif	

if DLC02ElevShaft.isAnimPlaying forward == 1 || DLC02ElevShaft.isAnimPlaying backward == 1
	triggerHitShader 0.1
	setRumble 0.15 0.1 0.01 ; going for a low, constant rumble
endif

end

Cipscis

Link to comment
Share on other sites

u've changed only

 

DLC02VSStoBaileys.activate player ; send player through to Bailey's Crossroads

set state to 0

 

into

 

set state to 0

DLC02VSStoBaileys.activate player ; send player through to Bailey's Crossroads

 

 

right?

 

I've tried and noting has been changed

it must be something else

Link to comment
Share on other sites

That's correct, I only swapped those two lines of code.

 

How did you test this? If you used a save in which the lift has already been used, then changing the script wouldn't have any effect, assuming that I'm correct about this being the problem.

 

Cipscis

Link to comment
Share on other sites

Archived

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

  • Recently Browsing   0 members

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