i3670 
			Posting Freak36  
	
		
			
[SOLVED] Level issue 
 
				So, I've run into an issue with one of my maps. As I enter a part of the map the framerate begins to drop significantly until it dies completely. Does anyone know what might be the cause behind this? I've enclosed the hps file in case there's some issue in there.
.hps file
Spoiler below!  
#include "interfaces/Map_Interface.hps" const  tString gsDoorCodeNo  =  "0735" ; enum eHubRoomTerminalState { eHubRoomTerminalState_MainMenu  = - 1 , eHubRoomTerminalState_Mail , eHubRoomTerminalState_Power , eHubRoomTerminalState_Staff , eHubRoomTerminalState_LogOut , eHubRoomTerminalState_LogIn_Main , eHubRoomTerminalState_LogIn_Code , enum eHubRoomTerminalUsers { eHubRoomTerminalUsers_Amy  =  2 , eHubRoomTerminalUsers_Carl  =  7 , cScrMap  :  iScrMap { ///////////////////////////////////////// bool mbPlayerGotLight ; bool mbPlayerIsSitting ; bool mbPitchLimitsSaved  =  false ; cVector2f mvSavedPitchLimits ; tString msTrainChairName ; //} END VARIABLE CREATION void Setup () //------------------------------------------------------- void OnStart () SetupLabCamera (); Map_AddTimer ( "TrainBounce" , 1.0 , "Timer_TrainBounce" ); Map_AddTimer ( "ComputerLoad" , 1.0 , "Timer_ComputerLoad" ); Prop_MoveLinearTo ( "01_05_transporter_passenger_1" ,  "train_arrived" ,  10 ,  12 ,  4.0f ,  false ); Light_SetVisible ( "SamsElectrolyte" , false ); ParticleSystem_SetVisible ( "SamElecPS_*" , false ); ParticleSystem_SetVisible ( "panelPS_*" , false ); ParticleSystem_SetVisible ( "wau_panelPS_*" , false ); Light_SetVisible ( "PointLight_156" , false ); Entity_PlayAnimation ( "patchwork" , "lying" , 0.0f , true ); Prop_SetStaticPhysics ( "01_05_transporter_passenger_door*" ,  true ); Entity_AttachToEntity ( "player" ,  "01_05_transporter_passenger_1" ,  "" ,  false ,  true ); Sound_CreateAtEntity ( "TrainLoop" ,  "01_04_transport_station/Special/Train/sequence" ,  "player" ,  0.0f ,  false ,  1.0f ); /////Starting Sequence/////// Player_SetJumpDisabled ( true ); Effect_Fade_Out ( 0.0f ); Effect_Fade_In ( 5.0f ); Sound_FadeGlobalVolume ( 0.0f ,  0.0f ,  eSoundEntryType_WorldAll ); Sound_FadeGlobalVolume ( 1.0f ,  5.0f ,  eSoundEntryType_WorldAll ); /////Starting Sequence End// } //------------------------------------------------------- void Timer_TrainBounce (const  tString  & in asTimer ) //////////////////////// Map_AddTimer ( "TrainBounce" , cMath_RandRectf ( 1.0 , 3.0 ), "Timer_TrainBounce" ); /////////////////////////////////////////////// Effect_Shake_Start ( 0.03 , 0.1 , 0.21 , 0.21 , cVector3f ( 0 , 1 , 0 ), 3 ); void stunrod_1_OnPlayerInteract (const  tString  & in asEntity ) Sound_CreateAtEntity ( "" ,  "03_02_omicron_inside/gameplay/battery/battery_pickup" ,  "player" ,  0.0f ,  false ,  1.0f ); bool TrainCollideFirst (const  tString  & in asParent , const  tString  & in asChild ,  int alState ) Prop_MoveLinearTo ( "01_05_transporter_passenger_1" ,  "train_arrived" ,  5 ,  7 ,  0.0f ,  false ); Sound_CreateAtEntity ( "TrainArrive" ,  "00_01_subway/SFX/train_arriving" ,  "player" ,  0.0f ,  false ,  1.0f ); true ; bool TrainCollideSecond (const  tString  & in asParent , const  tString  & in asChild ,  int alState ) Prop_MoveLinearTo ( "01_05_transporter_passenger_1" ,  "train_arrived" ,  5 ,  15 ,  0.0f ,  false ); Prop_MoveLinearTo ( "slidedoor_traintunnel_2" ,  "door_fucker" ,  5 ,  15 ,  0.0f ,  false ); Entity_SetActive ( "slidedoor_traintunnel_2" ,  false ); Effect_Shake_Start ( 0.1f , 2.0f , 0.21f , 0.21f , cVector3f ( 0.1 , 0.1 , 0.1 ), 2 ); Map_AddTimer ( "TimerBrakes" ,  1.5f ,  "TimerTramDoors" ); Sound_Stop ( "TrainLoop" ,  4.0f ); false ; bool TrainCollideLast (const  tString  & in asParent , const  tString  & in asChild ,  int alState ) Prop_MoveLinearTo ( "01_05_transporter_passenger_1" ,  "train_arrived" ,  5 ,  0 ,  8.0f ,  false ); Prop_MoveLinearTo ( "slidedoor_traintunnel_2" ,  "door_fucker_1" ,  5 ,  5 ,  0.0f ,  false ); Map_RemoveTimer ( "TrainBounce" ); Player_SetMoveSpeedMul ( 1.0f ); Player_SetJumpDisabled ( false ); Player_SetStandDisabled ( false ); Player_SetPitchLimits ( 0 , 0 ); Player_SetYawLimits ( 0 , 0 ); Sound_CreateAtEntity ( "" ,  "00_01_subway/ambience/inside/announcer_ping" ,  "01_05_transporter_passenger_1" ,  0.0 ,  false ); mbPlayerIsSitting  =  false ; Map_AddTimer ( "TimerSound" ,  2.0f ,  "TimerTramDoors" ); Map_AddTimer ( "TimerOpen" ,  3.0f ,  "TimerTramDoors" ); true ; void TimerTramDoors (const  tString  & in asTimer ) asTimer  ==  "TimerSound" ){ Sound_CreateAtEntity ( "" ,  "Entities_Station/object/train/door/open_motion" ,  "SlidedoorAtStation_1" ,  0 ,  false ); Sound_CreateAtEntity ( "" ,  "Entities_Station/object/train/door/open_start" ,  "SlidedoorAtStation_1" ,  0 ,  false ); Sound_CreateAtEntity ( "" ,  "Entities_Station/object/train/door/open_motion" ,  "SlidedoorAtStation_2" ,  0 ,  false ); Sound_CreateAtEntity ( "" ,  "Entities_Station/object/train/door/open_start" ,  "SlidedoorAtStation_2" ,  0 ,  false ); Entity_SetInteractionDisabled ( "Omnitool" , false ); asTimer  ==  "TimerOpen" ){     PhysicsSlideDoor_AutoMoveToState ( "SlidedoorAtStation_*" ,  1 ); Entity_SetActive ( "01_05_transporter_passenger_door*" ,  false ); Entity_SetActive ( "SlidedoorAtStation_*" ,  true ); Prop_MoveLinearTo ( "slidedoor_traintunnel_2" ,  "door_fucker_1" ,  5 ,  5 ,  0.0f ,  false ); asTimer  ==  "TimerBrakes" ){     Sound_CreateAtEntity ( "TrainArrive" ,  "02_06_theta_tunnels/sfx/events/elevator_sequence/motor/stop" ,  "player" ,  0.0f ,  false ,  0.7f ); Map_RemoveTimer ( "TimerBrakes" ); bool OmniTool_OnUse (const  tString  & in asTool , const  tString  & in asEntity ) asEntity  ==  "FirstSeal" ) CathTool_UseOnPanel ( "Omnitool" , "FirstSeal" ); true ; false ; void FirstSeal_OnConnectionStateChange (const  tString  & in asEntity ,  int alState ) Map_AddTimer ( "DockDoorButton_Interact" ,  2.0f ,  "DockDoorButton_Interact" ); void DockDoorButton_Interact (const  tString  & in asTimer ) SlideDoor_SetClosed ( "FirstSealedDoor" , false ); Entity_SetActive ( "ToolArea_1" , false ); void InteractLeaveChair (const  tString  & in asEntity ) Sound_CreateAtEntity ( "player_sit" ,  "01_04_transport_station/SFX/foley/train_stand" ,  msTrainChairName ,  0 ,  false ); Entity_AttachToEntity ( "player" ,  "01_05_transporter_passenger_1" ,  "" ,  false ,  false ); //////////////////////////// void OnEnter () ImGui_PreloadImage ( "inv_omnitool.tga" ); ImGui_PreloadImage ( "graphics/imgui/station/filetreeicons/file_icon.tga" ); ImGui_PreloadImage ( "graphics/imgui/station/thirdparty/pda/pda_background.tga" ); //------------------------------------------------------- void OnLeave () //------------------------------------------------------- void OnPlayerKilled ( int alRecentDeaths , const  tString & in asSource ) //------------------------------------------------------- void OnAction ( int alAction ,  bool abPressed )  abPressed == false ) return; alAction  ==  eAction_Test1 ) //------------------------------------------------------- float DrawDebugOutput ( cGuiSet  @ apSet , iFontData  @ apFont , float afY ) //afY = cLux_DrawDebugText("My Debug value:"+..., afY); return  afY ; //------------------------------------------------------- void OnGui ( float afTimeStep ) //------------------------------------------------------- bool CollideRadiationArea (const  tString  & in asParent , const  tString  & in asChild ,  int alState ) Sound_CreateAtEntity ( "Rad" ,  "02_06_theta_tunnels/sfx/ark_comp/ark_comp_compile/ark_comp_compile_start" ,  "RadArea_3" ); true ; bool CollideSterilizerArea (const  tString  & in asParent , const  tString  & in asChild ,  int alState ) SlideDoor_SetClosed ( "slidedoor_theta_small_windowed_1" ,  true ,  false ); Entity_SetActive ( "SterilArea" ,  false ); Entity_SetActive ( "warning_1" ,  true ); Entity_SetActive ( "warning_2" ,  true ); Map_AddTimer ( "Timer_Sterilize_up" ,  3.0f ,  "Timer_Sterilize" ); Map_AddTimer ( "Timer_Sterilize_med" ,  4.0f ,  "Timer_Sterilize" ); Map_AddTimer ( "Timer_Sterilize_down" ,  5.0f ,  "Timer_Sterilize" ); Map_AddTimer ( "Timer_Sterilize_cloud" ,  7.5f ,  "Timer_Sterilize" ); Map_AddTimer ( "Timer_Sterilize_end" ,  12.5f ,  "Timer_Sterilize" ); Map_AddTimer ( "Timer_Sterilize_open" ,  15.5f ,  "Timer_Sterilize" ); true ; void Timer_Sterilize (const  tString  & in asTimer ) asTimer  ==  "Timer_Sterilize_up" ){     int i = 1 ; i <= 4 ; i ++){ ParticleSystem_CreateAtEntity ( "PS_Ster_" + i + "" ,  "steam_airlock.ps" ,  "PS_Area_" + i + "" ,  true ); Sound_CreateAtEntity ( "alarm" ,  "01_02_upsilon_inside_02/amb/spot/comm_room_alarm" ,  "PS_Area_13" ,  0.0f ,  true ,  3.0f );         asTimer  ==  "Timer_Sterilize_med" ){     int i = 5 ; i <= 8 ; i ++){ ParticleSystem_CreateAtEntity ( "PS_Ster_" + i + "" ,  "steam_airlock.ps" ,  "PS_Area_" + i + "" ,  true ); asTimer  ==  "Timer_Sterilize_down" ){     int i = 9 ; i <= 12 ; i ++){ ParticleSystem_CreateAtEntity ( "PS_Ster_" + i + "" ,  "steam_airlock.ps" ,  "PS_Area_" + i + "" ,  true ); asTimer  ==  "Timer_Sterilize_cloud" ){ ParticleSystem_CreateAtEntity ( "PS_Shower" ,  "steam_shower.ps" ,  "PS_Area_13" ,  true );     asTimer  ==  "Timer_Sterilize_end" ){ int i = 1 ; i <= 12 ; i ++){ ParticleSystem_Destroy ( "PS_Ster_" + i + "" ); ParticleSystem_Destroy ( "PS_Shower" ); Sound_Stop ( "alarm" ,  2.0f ); asTimer  ==  "Timer_Sterilize_open" ){ SlideDoor_SetClosed ( "slidedoor_theta_small_windowed_2" ,  false ,  false ); Entity_SetActive ( "warning_1" ,  false ); Entity_SetActive ( "warning_2" ,  false ); bool CollideSterilizerAreaOut (const  tString  & in asParent , const  tString  & in asChild ,  int alState ) SlideDoor_SetClosed ( "slidedoor_theta_small_windowed_2" ,  true ,  false ); Button_SetLocked ( "panel_laboratory_9" ,  true ,  true ); Entity_SetActive ( "SterilArea_1" ,  false ); true ; bool CollideAutoDoorOpen (const  tString  & in asParent , const  tString  & in asChild ,  int alState ) alState  ==  1 ){ SlideDoor_SetClosed ( "slidedoor_lab_glass_right_2" ,  false ,  false ); SlideDoor_SetClosed ( "slidedoor_lab_glass_left_2" ,  false ,  false ); alState  == - 1 ){ SlideDoor_SetClosed ( "slidedoor_lab_glass_right_2" ,  true ,  false ); SlideDoor_SetClosed ( "slidedoor_lab_glass_left_2" ,  true ,  false ); true ; bool TriggerScreamFlicker (const  tString  & in asParent , const  tString  & in asChild ,  int alState ) Entity_SetActive ( "AreaTriggerScreamFlicker" ,  false ); Entity_SetActive ( "DistortionArea_6" ,  true ); Map_AddTimer ( "Timer_Start" ,  0.5f ,  "TimerFlickerStart" ); Map_AddTimer ( "Timer_Break" ,  2.75f ,  "TimerFlickerStart" ); Map_AddTimer ( "Timer_Stop" ,  3.5f ,  "TimerFlickerStart" ); Sound_CreateAtEntity ( "" ,  "NPC_Creatures/Vocalisations/InWorld/Flesher/ladder_scream" ,  "slidedoor_theta_small_12" ,  0.0f ,  false ,  2.0f ); true ; void TimerFlickerStart (const  tString  & in asTimer ) asTimer  ==  "Timer_Start" ){     Lamp_SetFlickerActive ( "living_quarters_fluo_*" , true ); asTimer  ==  "Timer_Break" ){     Lamp_SetFlickerActive ( "living_quarters_fluo_1" , false ); Lamp_SetLit ( "living_quarters_fluo_1" ,  false ,  false ); Lamp_SetFlickerActive ( "living_quarters_fluo_3" , false ); Lamp_SetLit ( "living_quarters_fluo_3" ,  false ,  false ); ParticleSystem_CreateAtEntity ( "" , "elec_spark_physics_few_oneshot.ps" , "Elec_Area_1" , false ); ParticleSystem_CreateAtEntity ( "" , "elec_spark_physics_few_oneshot.ps" , "Elec_Area_2" , false ); asTimer  ==  "Timer_Stop" ){     Lamp_SetFlickerActive ( "living_quarters_fluo_*" , false ); Entity_SetActive ( "DistortionArea_6" ,  false ); void SwitchedOnLights (const  tString  & in asEntity ,  int alState ) alState  ==  1 ){ Sound_Play ( "SoundScream" ,  0.1 ); Sound_CreateAtEntity ( "Startup" ,  "01_02_upsilon_inside_02/sfx/carl_torture_event/electricity_start" ,  "ElecSoundArea" ,  0.0f ,  false ,  1.0f ); Sound_CreateAtEntity ( "Loop" ,  "01_02_upsilon_inside_02/sfx/carl_torture_event/electricity_loop" ,  "ElecSoundArea" ,  2.0f ,  false ,  1.0f ); Sound_CreateAtEntity ( "CooldownLoop" ,  "01_02_upsilon_inside_02/sfx/carl_torture_event/cooldown_loop" ,  "ElecSoundArea" ,  2.0f ,  false ,  1.0f ); ParticleSystem_CreateAtEntity ( "OldSparky" , "elec_spark_large_continuous.ps" , "SamExecutionElec_*" , false ); ParticleSystem_SetVisible ( "SamElecPS_*" , true ); Entity_SetActive ( "DistortionArea_7" ,  true ); Map_AddTimer ( "TimerScreamSam" ,  .75f ,  "TimerSoundLoop" ); Light_SetVisible ( "SamsElectrolyte" , true ); alState  == - 1 ){ ParticleSystem_Destroy ( "OldSparky" ); Map_RemoveTimer ( "TimerScreamSam" ); Lamp_SetFlickerActive ( "living_quarters_fluo_*" , false ); ParticleSystem_SetVisible ( "SamElecPS_*" , false ); Entity_SetActive ( "DistortionArea_7" ,  false ); Entity_SetActive ( "ark_crew_04_1" ,  false ); Entity_SetActive ( "ark_crew_04_2" ,  true ); Sound_Stop ( "Startup" ,  1.0f ); Sound_Stop ( "Loop" ,  1.0f ); Light_SetVisible ( "SamsElectrolyte" , false ); Button_SetLocked ( "theta_panel_lightswitch_attachment_3" ,  false , true ); Sound_CreateAtEntity ( "sparkssy" ,  "level_amb_shared_interior/amb/spot/sparks/spark_train_crash" ,  "theta_panel_lightswitch_attachment_3" ,  0.0f ,  false ,  1.0f ); ParticleSystem_SetVisible ( "panelPS_*" , true ); void TimerSoundLoop (const  tString  & in asTimer ) asTimer  ==  "TimerScreamSam" ){     Lamp_SetFlickerActive ( "living_quarters_fluo_*" , true ); Sound_Play ( "SoundScream" ,  0.1 ); Map_AddTimer ( "TimerScreamSam" ,  .75f ,  "TimerSoundLoop" ); void InteractPartialDoorButton (const  tString  & in asEntity ) Light_SetVisible ( "PointLight_156" , true ); ParticleSystem_SetVisible ( "wau_panelPS_*" , false ); Button_SetLocked ( "theta_panel_26" , false , true ); Entity_SetInteractionDisabled ( "theta_panel_26" , true ); Player_GiveDamage ( 0.1f ,  0.1 ,  eDamageType_Electricity ,  "" ); //------------------------------------------------------- bool mbButtonPressed ; //------------------------------------------------------- bool mbSentDraft  =  false ; bool mbCommRoomPoweredOn  =  false ; void TerminalEntrance_OnGui (const  tString & in asEntityName ,  float afTimeStep ) // Set Translation Category ImGui_SetTransCategory ( "Arlington_Concept_01" ); ///////////////////////////////// StationGuiBG_Backdrop ( "background/background_logo_pathOS" ,  cVector2f ( 0.01 ,  0.45 )); StationGuiBG_Scanlines (); StationGuiBG_Taskbar ( "upsilon" ); ImGui_GetStateBool ( "DisplayLowPowerError" ,  false )) StationGui_DrawAndCheckErrors ()) return; int lMail  = - 1 ; bool bBackButtonEnabled  =  true ; int lBackApp  =  eHubRoomTerminalState_MainMenu ; int lActiveApp  =  StationGui_GetActiveApp (); lActiveApp ) eHubRoomTerminalState_LogIn_Main : eHubRoomTerminalState_LogIn_Code : StationGui_Numpad ( "ControlTerminalApp_LogIn" ,  4 )) StationGui_SetActiveApp ( eHubRoomTerminalState_LogIn_Main ); bBackButtonEnabled  =  true ; lBackApp  =  eHubRoomTerminalState_LogIn_Main ; eHubRoomTerminalState_Mail : ImGui_GetStateInt ( "LoginUser" )== eHubRoomTerminalUsers_Amy ) Depth_ImGui_AddMail ( "EntranceTerminal_Subject_1" ,  "EntranceTerminal_Body_1" ,  "" ,  "EntranceTerminal_Date_1" ,  eMailAppEntryType_Sent ); Depth_ImGui_AddMail ( "EntranceTerminal_Subject_1" ,  "EntranceTerminal_Body_1" ,  "" ,  "EntranceTerminal_Date_1" ,  eMailAppEntryType_Inbox ); Depth_ImGui_AddMail ( "EntranceTerminal_Subject_1" ,  "EntranceTerminal_Body_1" ,  "" ,  "EntranceTerminal_Date_1" ,  eMailAppEntryType_Inbox ); Depth_ImGui_AddMail ( "EntranceTerminal_Subject_2" ,  "EntranceTerminal_Body_2" ,  "" ,  "EntranceTerminal_Date_2" ,  eMailAppEntryType_Draft ); Depth_ImGui_AddMail ( "EntranceTerminal_Subject_4" ,  "EntranceTerminal_Body_4" ,  "" ,  "EntranceTerminal_Date_4" ,  eMailAppEntryType_Inbox ); StationGui_MailApp ( "SentMail_HubRoomTerminal" ); eHubRoomTerminalState_Power : StationGui_Numpad ( "ComputerNumPad_Header" ,  5 )) tString sCode  =  StationGui_GetNumpadInput (); sCode  ==  "27522" ) Button_SetLocked ( "highsecurity_1" ,  false ,  true ); StationGui_SetError ( "Decontamination_Text" ); cGuiDialogBoxSettings dialogBox  =  StationGui_CreateDefaultDialogBox (); dialogBox . mType  =  eGuiDialogBoxType_OK ; eGuiDialogCode code  =  Depth_ImGui_DialogBox ( "Decontamination_Header" ,  "Decontamination_Text" ,  dialogBox ); Sound_CreateAtEntity ( "" ,  "Entities_Station/tech/terminal_beeps/terminal_computer_granted" ,  ImGui_GetName (),  0.0f ,  false ,  1.0f ); code  ==  eGuiDialogCode_OK ) StationGui_SetActiveApp ( eHubRoomTerminalState_MainMenu ); StationGui_SetError ( "DoorNumPad_WrongCode" ); Button_SetLocked ( "highsecurity_1" ,  true ,  true ); Sound_CreateAtEntity ( "" ,  "Entities_Station/tech/terminal_beeps/terminal_computer_denied" ,  ImGui_GetName (),  0.0f ,  false ,  1.0f ); eHubRoomTerminalState_Staff : StationGui_TextReaderSingle ( "EntranceStaff_Header" ,  "EntranceStaff_Text" ); eHubRoomTerminalState_LogOut : StationGui_TextReaderSingle ( "SuperSecretProject_Header" ,  "SuperSecretProject_Text" ); eHubRoomTerminalState_MainMenu : StationGui_AddApp ( "EntranceTerminalApp_Mail" ); StationGui_AddApp ( "EntranceTerminalApp_Power" ); StationGui_AddApp ( "EntranceTerminalApp_Staff" ); StationGui_AddApp ( "EntranceTerminalApp_LogOut" ); StationGui_MainMenu (); bBackButtonEnabled  =  false ; StationGui_BackButton ( bBackButtonEnabled ,  lBackApp )) lActiveApp  ==  eHubRoomTerminalState_LogIn_Code ) StationGui_SetNumpadInput ( "" ); bool SentMail_HubRoomTerminal (const  tString  & in asTitle ) mbCommRoomPoweredOn ) StationGui_SetError ( "NetworkError_1" ); mbSentDraft  =  true ; mbCommRoomPoweredOn ; void Timer_ComputerLoad (const  tString  & in asTimer ) //////////////////////// Map_AddTimer ( "ComputerLoadStop" , cMath_RandRectf ( 3.0 , 6.0 ), "Timer_ComputerLoad" ); Sound_CreateAtEntity ( "CLoad" ,  "level_amb_shared_machines/tech/HDD/underload_loop" ,  "ComputerEntrance" ,  0.5f ,  true ,  0.8f ); asTimer  ==  "ComputerLoadStop" ){     Sound_Stop ( "CLoad" ,  0.2f ); Map_AddTimer ( "ComputerLoad" , cMath_RandRectf ( 10.0 , 18.0 ), "Timer_ComputerLoad" );         void TerminalEntrance_EnterGui (const  tString & in asEntityName ) void TerminalEntrance_LeaveGui (const  tString & in asEntityName ) void SetupLabCamera () Gui_CreateCameraTexture ( "LabCamera" ,  cVector2l ( 768 ,  613 ),  30 ,  90.0f ,  0.1 ,  60 ); Gui_AttachCameraTextureToEntity ( "LabCamera" ,  "CameraLabArea" ); /////////ResearchTerminals Begin\\\\\\\\\\\\ void ResearchTerminalOneOnGui (const  tString & in asEntityName ,  float afTimeStep ) cImGuiGfx gfx ( "LabCamera" ,  eImGuiGfx_Special ); ImGui_DrawGfx ( gfx ,  cVector3f ( 0 , 0 , 5.0f ),  ImGui_GetSize (),  cColor ( 1 ,  1 )); void ResearchTerminalTwoOnGui (const  tString & in asEntityName ,  float afTimeStep ) void ResearchTerminalThreeOnGui (const  tString & in asEntityName ,  float afTimeStep ) void ResearchTerminalFourOnGui (const  tString & in asEntityName ,  float afTimeStep ) /////////ResearchTerminals End\\\\\\\\\\\\ void DoorNumPad_OnGui (const  tString & in asEntityName ,  float afTimeStep ) StationGuiBG_Backdrop (); StationGuiBG_Scanlines (); StationGui_Numpad ( "DoorNumPad_Header" ,  4 )) tString sCode  =  StationGui_GetNumpadInput (); sCode  ==  "7491" ) Button_SetLocked ( "panel_laboratory_11" ,  false , true ); Sound_CreateAtEntity ( "" ,  "Entities_Station/tech/terminal_beeps/terminal_computer_granted" ,  ImGui_GetName (),  0.0f ,  false ,  1.0f ); StationGui_SetError ( "DoorNumPad_WrongCode" ); Sound_CreateAtEntity ( "" ,  "Entities_Station/tech/terminal_beeps/terminal_computer_denied" ,  ImGui_GetName (),  0.0f ,  false ,  1.0f ); void SamDatapad_OnGui (const  tString & in asEntityName ,  float afTimeStep ) ImGui_SetTransCategory ( "Arlington_Concept_01" ); StationGuiBG_Backdrop (); StationGuiBG_Scanlines (); cStationGui_TextReaderSettings settings ; settings . mbFullScreen  =  true ; StationGui_TextReaderSingle ( "SamData_Title" ,  "SamData_Body" ,  settings ,  cVector3f ( 0.05 ,  0.02 ,  1 ),  cVector2f ( 0.9 ,  0.95 )); //------------------------------------------------------- }  
 
 
 
			
				
(This post was last modified: 11-03-2016, 10:12 AM by i3670 .) 
 
				
			 
		 
 
 
	11-01-2016, 12:36 AM  
		
	 
 
	
		Mudbill 
			Muderator179  
	
		
			
RE: Level issue 
 
				That's quite a big script to scan which could be made much simpler with a little extra info. In what part does it happen? Can you try to narrow down as much script as possible to the issue? Could it perhaps be something placed in the level and not the script file?
			
			
				
(This post was last modified: 11-01-2016, 01:35 AM by Mudbill .) 
 
				
			 
		 
 
 
	11-01-2016, 01:35 AM  
		
	 
 
	
		Abion47 
			Senior Member46  
	
		
			
RE: Level issue 
 
				What Mudbill said is true - without some indication as to where in the script or your map the problem might be, digging through your entire script file to find the problem is pretty difficult. One thing that I noticed, however, is that you are using a camera texture on one of your terminals. If the camera in question can see the terminal screen, that can cause serious performance issues and potentially even crashes. If that is the case, move the camera or angle the terminal screen so the camera can't see it.
			
			
			
				
(This post was last modified: 11-01-2016, 06:06 AM by Abion47 .) 
 
				
			 
		 
 
 
	11-01-2016, 06:05 AM  
		
	 
 
	
		i3670 
			Posting Freak36  
	
		
			
RE: Level issue 
 
				Alright I've trimmed the .hps file for you and no the camera screen and the camera are not duplicated. These are the newest parts of the script a part from the "#include"s.
I'll check if removing the terminals that I've placed but not yet scripted will affect the issue. Edit: didn't work.
Spoiler below!  
#include "interfaces/Map_Interface.hps" const  tString gsDoorCodeNo  =  "0735" ; enum eHubRoomTerminalState { eHubRoomTerminalState_MainMenu  = - 1 , eHubRoomTerminalState_Mail , eHubRoomTerminalState_Power , eHubRoomTerminalState_Staff , eHubRoomTerminalState_LogOut , eHubRoomTerminalState_LogIn_Main , eHubRoomTerminalState_LogIn_Code , cScrMap  :  iScrMap { ///////////////////////////////////////// void Setup () //------------------------------------------------------- void OnStart () SetupLabCamera (); Map_AddTimer ( "TrainBounce" , 1.0 , "Timer_TrainBounce" ); Map_AddTimer ( "ComputerLoad" , 1.0 , "Timer_ComputerLoad" ); Prop_MoveLinearTo ( "01_05_transporter_passenger_1" ,  "train_arrived" ,  10 ,  12 ,  4.0f ,  false ); Light_SetVisible ( "SamsElectrolyte" , false ); ParticleSystem_SetVisible ( "SamElecPS_*" , false ); ParticleSystem_SetVisible ( "panelPS_*" , false ); ParticleSystem_SetVisible ( "wau_panelPS_*" , false ); Light_SetVisible ( "PointLight_156" , false ); Entity_PlayAnimation ( "patchwork" , "lying" , 0.0f , true ); Prop_SetStaticPhysics ( "01_05_transporter_passenger_door*" ,  true ); Entity_AttachToEntity ( "player" ,  "01_05_transporter_passenger_1" ,  "" ,  false ,  true ); Sound_CreateAtEntity ( "TrainLoop" ,  "01_04_transport_station/Special/Train/sequence" ,  "player" ,  0.0f ,  false ,  1.0f ); /////Starting Sequence/////// Player_SetJumpDisabled ( true ); Effect_Fade_Out ( 0.0f ); Effect_Fade_In ( 5.0f ); Sound_FadeGlobalVolume ( 0.0f ,  0.0f ,  eSoundEntryType_WorldAll ); Sound_FadeGlobalVolume ( 1.0f ,  5.0f ,  eSoundEntryType_WorldAll ); /////Starting Sequence End// } //------------------------------------------------------- void stunrod_1_OnPlayerInteract (const  tString  & in asEntity ) Sound_CreateAtEntity ( "" ,  "03_02_omicron_inside/gameplay/battery/battery_pickup" ,  "player" ,  0.0f ,  false ,  1.0f ); bool OmniTool_OnUse (const  tString  & in asTool , const  tString  & in asEntity ) asEntity  ==  "FirstSeal" ) CathTool_UseOnPanel ( "Omnitool" , "FirstSeal" ); true ; false ; void FirstSeal_OnConnectionStateChange (const  tString  & in asEntity ,  int alState ) Map_AddTimer ( "DockDoorButton_Interact" ,  2.0f ,  "DockDoorButton_Interact" ); void DockDoorButton_Interact (const  tString  & in asTimer ) SlideDoor_SetClosed ( "FirstSealedDoor" , false ); Entity_SetActive ( "ToolArea_1" , false ); //////////////////////////// void OnEnter () ImGui_PreloadImage ( "inv_omnitool.tga" ); ImGui_PreloadImage ( "graphics/imgui/station/filetreeicons/file_icon.tga" ); ImGui_PreloadImage ( "graphics/imgui/station/thirdparty/pda/pda_background.tga" ); //------------------------------------------------------- void OnLeave () //------------------------------------------------------- void OnPlayerKilled ( int alRecentDeaths , const  tString & in asSource ) //------------------------------------------------------- void OnAction ( int alAction ,  bool abPressed )  abPressed == false ) return; alAction  ==  eAction_Test1 ) //------------------------------------------------------- float DrawDebugOutput ( cGuiSet  @ apSet , iFontData  @ apFont , float afY ) //afY = cLux_DrawDebugText("My Debug value:"+..., afY); return  afY ; //------------------------------------------------------- void OnGui ( float afTimeStep ) //------------------------------------------------------- bool CollideAutoDoorOpen (const  tString  & in asParent , const  tString  & in asChild ,  int alState ) alState  ==  1 ){ SlideDoor_SetClosed ( "slidedoor_lab_glass_right_2" ,  false ,  false ); SlideDoor_SetClosed ( "slidedoor_lab_glass_left_2" ,  false ,  false ); alState  == - 1 ){ SlideDoor_SetClosed ( "slidedoor_lab_glass_right_2" ,  true ,  false ); SlideDoor_SetClosed ( "slidedoor_lab_glass_left_2" ,  true ,  false ); true ; bool TriggerScreamFlicker (const  tString  & in asParent , const  tString  & in asChild ,  int alState ) Entity_SetActive ( "AreaTriggerScreamFlicker" ,  false ); Entity_SetActive ( "DistortionArea_6" ,  true ); Map_AddTimer ( "Timer_Start" ,  0.5f ,  "TimerFlickerStart" ); Map_AddTimer ( "Timer_Break" ,  2.75f ,  "TimerFlickerStart" ); Map_AddTimer ( "Timer_Stop" ,  3.5f ,  "TimerFlickerStart" ); Sound_CreateAtEntity ( "" ,  "NPC_Creatures/Vocalisations/InWorld/Flesher/ladder_scream" ,  "slidedoor_theta_small_12" ,  0.0f ,  false ,  2.0f ); true ; void TimerFlickerStart (const  tString  & in asTimer ) asTimer  ==  "Timer_Start" ){     Lamp_SetFlickerActive ( "living_quarters_fluo_*" , true ); asTimer  ==  "Timer_Break" ){     Lamp_SetFlickerActive ( "living_quarters_fluo_1" , false ); Lamp_SetLit ( "living_quarters_fluo_1" ,  false ,  false ); Lamp_SetFlickerActive ( "living_quarters_fluo_3" , false ); Lamp_SetLit ( "living_quarters_fluo_3" ,  false ,  false ); ParticleSystem_CreateAtEntity ( "" , "elec_spark_physics_few_oneshot.ps" , "Elec_Area_1" , false ); ParticleSystem_CreateAtEntity ( "" , "elec_spark_physics_few_oneshot.ps" , "Elec_Area_2" , false ); asTimer  ==  "Timer_Stop" ){     Lamp_SetFlickerActive ( "living_quarters_fluo_*" , false ); Entity_SetActive ( "DistortionArea_6" ,  false ); void SwitchedOnLights (const  tString  & in asEntity ,  int alState ) alState  ==  1 ){ Sound_Play ( "SoundScream" ,  0.1 ); Sound_CreateAtEntity ( "Startup" ,  "01_02_upsilon_inside_02/sfx/carl_torture_event/electricity_start" ,  "ElecSoundArea" ,  0.0f ,  false ,  1.0f ); Sound_CreateAtEntity ( "Loop" ,  "01_02_upsilon_inside_02/sfx/carl_torture_event/electricity_loop" ,  "ElecSoundArea" ,  2.0f ,  false ,  1.0f ); Sound_CreateAtEntity ( "CooldownLoop" ,  "01_02_upsilon_inside_02/sfx/carl_torture_event/cooldown_loop" ,  "ElecSoundArea" ,  2.0f ,  false ,  1.0f ); ParticleSystem_CreateAtEntity ( "OldSparky" , "elec_spark_large_continuous.ps" , "SamExecutionElec_*" , false ); ParticleSystem_SetVisible ( "SamElecPS_*" , true ); Entity_SetActive ( "DistortionArea_7" ,  true ); Map_AddTimer ( "TimerScreamSam" ,  .75f ,  "TimerSoundLoop" ); Light_SetVisible ( "SamsElectrolyte" , true ); alState  == - 1 ){ ParticleSystem_Destroy ( "OldSparky" ); Map_RemoveTimer ( "TimerScreamSam" ); Lamp_SetFlickerActive ( "living_quarters_fluo_*" , false ); ParticleSystem_SetVisible ( "SamElecPS_*" , false ); Entity_SetActive ( "DistortionArea_7" ,  false ); Entity_SetActive ( "ark_crew_04_1" ,  false ); Entity_SetActive ( "ark_crew_04_2" ,  true ); Sound_Stop ( "Startup" ,  1.0f ); Sound_Stop ( "Loop" ,  1.0f ); Light_SetVisible ( "SamsElectrolyte" , false ); Button_SetLocked ( "theta_panel_lightswitch_attachment_3" ,  false , true ); Sound_CreateAtEntity ( "sparkssy" ,  "level_amb_shared_interior/amb/spot/sparks/spark_train_crash" ,  "theta_panel_lightswitch_attachment_3" ,  0.0f ,  false ,  1.0f ); ParticleSystem_SetVisible ( "panelPS_*" , true ); void TimerSoundLoop (const  tString  & in asTimer ) asTimer  ==  "TimerScreamSam" ){     Lamp_SetFlickerActive ( "living_quarters_fluo_*" , true ); Sound_Play ( "SoundScream" ,  0.1 ); Map_AddTimer ( "TimerScreamSam" ,  .75f ,  "TimerSoundLoop" ); void InteractPartialDoorButton (const  tString  & in asEntity ) Light_SetVisible ( "PointLight_156" , true ); ParticleSystem_SetVisible ( "wau_panelPS_*" , false ); Button_SetLocked ( "theta_panel_26" , false , true ); Entity_SetInteractionDisabled ( "theta_panel_26" , true ); Player_GiveDamage ( 0.1f ,  0.1 ,  eDamageType_Electricity ,  "" ); //------------------------------------------------------- bool mbButtonPressed ; //------------------------------------------------------- void Timer_ComputerLoad (const  tString  & in asTimer ) //////////////////////// Map_AddTimer ( "ComputerLoadStop" , cMath_RandRectf ( 3.0 , 6.0 ), "Timer_ComputerLoad" ); Sound_CreateAtEntity ( "CLoad" ,  "level_amb_shared_machines/tech/HDD/underload_loop" ,  "ComputerEntrance" ,  0.5f ,  true ,  0.8f ); asTimer  ==  "ComputerLoadStop" ){     Sound_Stop ( "CLoad" ,  0.2f ); Map_AddTimer ( "ComputerLoad" , cMath_RandRectf ( 10.0 , 18.0 ), "Timer_ComputerLoad" );         void TerminalEntrance_EnterGui (const  tString & in asEntityName ) void TerminalEntrance_LeaveGui (const  tString & in asEntityName ) void SetupLabCamera () Gui_CreateCameraTexture ( "LabCamera" ,  cVector2l ( 768 ,  613 ),  30 ,  90.0f ,  0.1 ,  60 ); Gui_AttachCameraTextureToEntity ( "LabCamera" ,  "CameraLabArea" ); /////////ResearchTerminals Begin\\\\\\\\\\\\ void ResearchTerminalOneOnGui (const  tString & in asEntityName ,  float afTimeStep ) cImGuiGfx gfx ( "LabCamera" ,  eImGuiGfx_Special ); ImGui_DrawGfx ( gfx ,  cVector3f ( 0 , 0 , 5.0f ),  ImGui_GetSize (),  cColor ( 1 ,  1 )); void ResearchTerminalTwoOnGui (const  tString & in asEntityName ,  float afTimeStep ) void ResearchTerminalThreeOnGui (const  tString & in asEntityName ,  float afTimeStep ) void ResearchTerminalFourOnGui (const  tString & in asEntityName ,  float afTimeStep ) //------------------------------------------------------- }  
 
 
 
			
				
(This post was last modified: 11-01-2016, 08:00 AM by i3670 .) 
 
				
			 
		 
 
 
	11-01-2016, 07:51 AM  
		
	 
 
	
		Draugemalf 
			Junior Member4  
	
		
			
RE: Level issue 
 
				I had a similar issue when working on one of my mods. Check physics debug and see if you accidentally placed physics objects inside static stuff without checking the static physics button first (it was some oceanbottom rocks for me). That usually kills the framerate for some areas of the map.
			
			
			
 
 
 
	11-02-2016, 12:30 PM  
		
	 
 
	
		i3670 
			Posting Freak36  
	
		
			
RE: Level issue 
 
				I've never done a physics debug, can you explain further?
			
			
			
 
 
 
	11-02-2016, 09:08 PM  
		
	 
 
	
		Draugemalf 
			Junior Member4  
	
		
			
RE: Level issue 
 
				It should be somewhere on the somadev menu. Like show physics info or something similar. That might help you identify the problem if it's caused by that.
			
			
			
 
 
 
	11-02-2016, 11:44 PM  
		
	 
 
	
		Abion47 
			Senior Member46  
	
		
			
RE: Level issue 
 
				You still haven't given any indication as to when in the script the problem could possibly be. For example, if it happens around the time that "CollideAutoDoorOpen" gets triggered, or when the timer "TimerFlickerStart" is initiated. Without that kind of information, all we can do is blindly guess at the hundred things it might  be.
			
			
				
(This post was last modified: 11-03-2016, 12:46 AM by Abion47 .) 
 
				
			 
		 
 
 
	11-03-2016, 12:44 AM  
		
	 
 
	
		i3670 
			Posting Freak36  
	
		
			
RE: Level issue 
 
				I found it. It's this little piece of code which just adds sound after sound until it can't even count them.
void Timer_ComputerLoad (const  tString  & in asTimer ) //////////////////////// Map_AddTimer ( "ComputerLoadStop" , cMath_RandRectf ( 3.0 , 6.0 ), "Timer_ComputerLoad" ); Sound_CreateAtEntity ( "CLoad" ,  "level_amb_shared_machines/tech/HDD/underload_loop" ,  "ComputerEntrance" ,  0.5f ,  true ,  0.8f ); asTimer  ==  "ComputerLoadStop" ){     Sound_Stop ( "CLoad" ,  0.2f ); Map_AddTimer ( "ComputerLoad" , cMath_RandRectf ( 10.0 , 18.0 ), "Timer_ComputerLoad" );         
 
 
 
	11-03-2016, 10:10 AM