Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOLVED] Level issue
i3670 Offline
Posting Freak

Posts: 1,308
Threads: 74
Joined: Oct 2011
Reputation: 36
#4
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!

PHP Code: (Select All)
#include "interfaces/Map_Interface.hps"
#include "base/Inputhandler_Types.hps"

#include "helpers/helper_map.hps"
#include "helpers/helper_props.hps"
#include "helpers/helper_effects.hps"
#include "helpers/helper_audio.hps"
#include "helpers/helper_imgui.hps"
#include "helpers/helper_sequences.hps"
#include "helpers/helper_game.hps"
#include "helpers/helper_modules.hps"
#include "helpers/helper_ai.hps"
#include "helpers/helper_player.hps"
#include "helper_custom_depth.hps"

#include "helper_imgui_station.hps"
#include "helper_imgui_station_apps_common.hps"
#include "helper_imgui_station_app_error.hps"
#include "helper_imgui_station_app_numpad.hps"
#include "helper_imgui_station_app_audioplayback.hps"
#include "helper_imgui_station_app_mail.hps"

//--------------------------------------------------
 
/*Place any global values here. These must be const variables as they will not be saved*/
/*This is also the place for enums and classes, but these should be avoided whenever possible*/
 
//--------------------------------------------------

const tString gsDoorCodeNo "0735";


enum eHubRoomTerminalState
{
    
eHubRoomTerminalState_MainMenu = -1,
    
eHubRoomTerminalState_Mail,
    
eHubRoomTerminalState_Power,
    
eHubRoomTerminalState_Staff,
    
eHubRoomTerminalState_LogOut,
    
eHubRoomTerminalState_LogIn_Main,
    
eHubRoomTerminalState_LogIn_Code,
}

class 
cScrMap iScrMap
{
    
/////////////////////////////////////////
    // ==============
    // VARIABLE CREATION
    // ==============
    //{///////////////////////////////////////
    
    //} END VARIABLE CREATION
    //--------------------------------------------
 
    //////////////////////////////////////////////////////////////////////////////////////////
    // ==============
    // MAIN CALLBACKS
    // ==============
    //{///////////////////////////////////////////////////////////////////////////////////////
 
    //-------------------------------------------------------
 
    ////////////////////////////
    // Set up map environment
    
void Setup()
    {
    
    }
    
    
//-------------------------------------------------------

    ////////////////////////////
    // Run first time starting map
    
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"10124.0ffalse);
        
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"""falsetrue);
        
        
Sound_CreateAtEntity("TrainLoop""01_04_transport_station/Special/Train/sequence""player"0.0ffalse1.0f);
/////Starting Sequence///////
        
Player_SetJumpDisabled(true);
        
        
Effect_Fade_Out(0.0f);
        
Effect_Fade_In(5.0f);
        
        
Sound_FadeGlobalVolume(0.0f0.0feSoundEntryType_WorldAll);
        
Sound_FadeGlobalVolume(1.0f5.0feSoundEntryType_WorldAll);

/////Starting Sequence End//
    
}

    
//-------------------------------------------------------
    
    
void stunrod_1_OnPlayerInteract(const tString &in asEntity)
    {
        
Sound_CreateAtEntity("""03_02_omicron_inside/gameplay/battery/battery_pickup""player"0.0ffalse1.0f);
    }
    
    
bool OmniTool_OnUse(const tString &in asTool, const tString &in asEntity)
    {
        if (
asEntity == "FirstSeal")
        {
            
CathTool_UseOnPanel("Omnitool","FirstSeal");
            return 
true;
        }
        
    return 
false;
    }
    
    
void FirstSeal_OnConnectionStateChange(const tString &in asEntityint 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);
    }
    
    
    
    
////////////////////////////
    // Run when entering map
    
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");
        
    }

    
//-------------------------------------------------------

    ////////////////////////////
    // Run when leaving map
    
void OnLeave()
    {
    }

    
//-------------------------------------------------------

    ////////////////////////////
    // The player has died.
    
void OnPlayerKilled(int alRecentDeaths, const tString&in asSource)
    {
    }

    
//-------------------------------------------------------

    ////////////////////////////
    // To get when player makes input (mostly used for debug)
    
void OnAction(int alActionbool abPressed
    {
        if(
abPressed==false) return;
        
        if(
alAction == eAction_Test1)
        {
        }
    }

    
//-------------------------------------------------------

    ////////////////////////////
    // This only used for pure debug purposes when info needs to printed.
    
float DrawDebugOutput(cGuiSet @apSet,iFontData @apFont,float afY)
    {
        
//afY = cLux_DrawDebugText("My Debug value:"+..., afY);
        
return afY;
    }
    
    
//-------------------------------------------------------
    
    
void OnGui(float afTimeStep)
    {
        
    }
 
    
//-------------------------------------------------------
 
    //} END MAIN CALLBACKS
 
 
    //////////////////////////////////////////////////////////////////////////////////////////
    // ==============
    // MAIN FUNCTIONS
    // ==============
    //{///////////////////////////////////////////////////////////////////////////////////////
 
    //-------------------------------------------------------
 
    /*Put any variables that are used in more than one scene here.*/
 
    //-------------------------------------------------------
 
    /*Put any functions that are used in more than one scene here.*/
    
    
bool CollideAutoDoorOpen(const tString &in asParent, const tString &in asChildint alState)
    {
    if (
alState == 1){
        
SlideDoor_SetClosed("slidedoor_lab_glass_right_2"falsefalse);
        
SlideDoor_SetClosed("slidedoor_lab_glass_left_2"falsefalse);
        }
    
    if (
alState == -1){
        
SlideDoor_SetClosed("slidedoor_lab_glass_right_2"truefalse);
        
SlideDoor_SetClosed("slidedoor_lab_glass_left_2"truefalse);

        }
    return 
true;
    }
    
    
bool TriggerScreamFlicker(const tString &in asParent, const tString &in asChildint 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.0ffalse2.0f);
    return 
true;
    }
    
    
void TimerFlickerStart(const tString &in asTimer)
    {
    if(
asTimer == "Timer_Start"){    
        
Lamp_SetFlickerActive("living_quarters_fluo_*",true);
            
    }
    if(
asTimer == "Timer_Break"){    
        
Lamp_SetFlickerActive("living_quarters_fluo_1",false);
        
Lamp_SetLit("living_quarters_fluo_1"falsefalse);
        
Lamp_SetFlickerActive("living_quarters_fluo_3",false);
        
Lamp_SetLit("living_quarters_fluo_3"falsefalse);
        
        
ParticleSystem_CreateAtEntity("","elec_spark_physics_few_oneshot.ps","Elec_Area_1",false);
        
ParticleSystem_CreateAtEntity("","elec_spark_physics_few_oneshot.ps","Elec_Area_2",false);
    }
    if(
asTimer == "Timer_Stop"){    
        
Lamp_SetFlickerActive("living_quarters_fluo_*",false);
        
Entity_SetActive("DistortionArea_6"false);
    }
    }
    
    
void SwitchedOnLights(const tString &in asEntityint alState)
    {    
        if (
alState == 1){
        
Sound_Play("SoundScream"0.1);
        
Sound_CreateAtEntity("Startup""01_02_upsilon_inside_02/sfx/carl_torture_event/electricity_start""ElecSoundArea"0.0ffalse1.0f);
        
Sound_CreateAtEntity("Loop""01_02_upsilon_inside_02/sfx/carl_torture_event/electricity_loop""ElecSoundArea"2.0ffalse1.0f);
        
Sound_CreateAtEntity("CooldownLoop""01_02_upsilon_inside_02/sfx/carl_torture_event/cooldown_loop""ElecSoundArea"2.0ffalse1.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);
        }
    
    if (
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.0ffalse1.0f);
        
ParticleSystem_SetVisible("panelPS_*",true);
    }
    }
    
    
void TimerSoundLoop(const tString &in asTimer)
    {
    if(
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.1f0.1eDamageType_Electricity"");
    }
 
 
 
    
//-------------------------------------------------------
 
    //} END MAIN FUNCTIONS
 
    //////////////////////////////////////////////////////////////////////////////////////////
    // ==============
    // SCENE X *NAME OF SCENE*
    // ==============
    //{//////////////////////////////////////////////////////////////////////////////////////
 
         /////////////////////////////////////////
         // General
         //{//////////////////////////////////////
         
        //-------------------------------------------------------
     
        /*Put any variables that are used by many events in Scene X here.*/
     
        //-------------------------------------------------------
     
        /*Put any functions that are used in more than one event in Scene X here.*/
     
        //-------------------------------------------------------
        
        //} END General    
     
         /////////////////////////////////////////
         // Event *Name Of Event*
         //{//////////////////////////////////////
     
         //-------------------------------------------------------
     
         /*Put any variables that are only used in Scene X, Event X here.*/
     
         //-------------------------------------------------------
     
         /*Put any functionsthat are only used in Scene X, Event X here.*/
     
         //-------------------------------------------------------
     
         //} END Event *Name Of Event*
     
     //} END SCENE X
 
 
     /////////////////////////////////////////
     // ==============
     // TERMINALS
     // ==============
     //{//////////////////////////////////////
 
         //-------------------------------------------------------
     
         /////////////////////////////////////////
         // Terminal *Name Of Terminal*
         //{//////////////////////////////////////
     
         //-------------------------------------------------------
     
         /*Put any variables that are only used Terminal here.*/
         
         
bool mbButtonPressed;
     
         
//-------------------------------------------------------
     
         /*Put any functions that are only used Terminal here.*/
        
        
void Timer_ComputerLoad(const tString &in asTimer)
        {    
        
////////////////////////
        // This timer should repeat!
        
Map_AddTimer("ComputerLoadStop",cMath_RandRectf(3.0,6.0),"Timer_ComputerLoad");
        
        
Sound_CreateAtEntity("CLoad""level_amb_shared_machines/tech/HDD/underload_loop""ComputerEntrance"0.5ftrue0.8f);
        
        if(
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(768613), 3090.0f0.160);
        
Gui_AttachCameraTextureToEntity("LabCamera""CameraLabArea");
    }
    
/////////ResearchTerminals Begin\\\\\\\\\\\\
    
    
void ResearchTerminalOneOnGui(const tString&in asEntityNamefloat afTimeStep)
    {
        
cImGuiGfx gfx("LabCamera"eImGuiGfx_Special);
        
ImGui_DrawGfx(gfxcVector3f(0,0,5.0f), ImGui_GetSize(), cColor(11));
    
    }
    
    
void ResearchTerminalTwoOnGui(const tString&in asEntityNamefloat afTimeStep)
    {
    
    }
    
    
void ResearchTerminalThreeOnGui(const tString&in asEntityNamefloat afTimeStep)
    {
    
    }
    
    
void ResearchTerminalFourOnGui(const tString&in asEntityNamefloat afTimeStep)
    {
    
    }
        
     
         
//-------------------------------------------------------
     
         //} END Terminal *Name Of Terminal*
    
    //} END TERMINALS
 



"What you think is irrelevant" - A character of our time

A Christmas Hunt
(This post was last modified: 11-01-2016, 08:00 AM by i3670.)
11-01-2016, 07:51 AM
Find


Messages In This Thread
[SOLVED] Level issue - by i3670 - 11-01-2016, 12:36 AM
RE: Level issue - by Mudbill - 11-01-2016, 01:35 AM
RE: Level issue - by Abion47 - 11-01-2016, 06:05 AM
RE: Level issue - by i3670 - 11-01-2016, 07:51 AM
RE: Level issue - by Draugemalf - 11-02-2016, 12:30 PM
RE: Level issue - by i3670 - 11-02-2016, 09:08 PM
RE: Level issue - by Draugemalf - 11-02-2016, 11:44 PM
RE: Level issue - by Abion47 - 11-03-2016, 12:44 AM
RE: Level issue - by i3670 - 11-03-2016, 10:10 AM



Users browsing this thread: 1 Guest(s)