Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #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 "player.hps"
- //From my Amnesia Rebirth Tutorial Series
- //https://www.youtube.com/channel/UCHEzyhMw1EALBcJEKVJFmwA
- //--------------------------------------------------
- /*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*/
- //--------------------------------------------------
- class cScrMap : iScrMap
- {
- void Setup()
- {
- PlayerBody_SetActive(true);
- Player_SetCanRun(false);
- Player_SetVertigoActive(false);
- }
- void PreloadData()
- {
- }
- void OnStart()
- {
- if(cLux_ScriptDebugOn())
- {
- }
- }
- void OnEnter()
- {
- Game_AutoSave();
- }
- void OnLeave()
- {
- }
- void OnPlayerKilled(int alRecentDeaths, const tString&in asSource)
- {
- }
- bool OnDeath(const tString &in asSource)
- {
- cLux_AddTodoMessage("DEAD : SOURCE = " + asSource);
- if (asSource == "SomeReason")
- {
- Effect_Fade_Out(1.0f);
- return true;
- }
- return false;
- }
- bool OnRespawn(const tString &in asSource)
- {
- return false;
- }
- void OnAction(int alAction, bool abPressed)
- {
- if(abPressed==false) return;
- if(alAction == eAction_Test1)
- {
- }
- }
- float DrawDebugOutput(cGuiSet @apSet,iFontData @apFont,float afY)
- {
- return afY;
- }
- //Our functions------------------------------------------------------------
- bool OnCollide_Player_Trigger_1(const tString &in asParent, const tString &in asChild, int alState)
- {
- //asParent is the name of the object that has the callback
- //asChild is the name of the object that collided with the parent
- if(alState == 1){
- //This stuff will happen when the player enters the trigger area
- cLux_AddDebugMessage("Enabling players running");
- Player_SetCanRun(true);
- return false;
- }else{
- //This stuff will happen when the player leaves trigger area
- return false;
- }
- }
- void OnBreak_Bottle_1(const tString &in asEntity)
- {
- //asEntity is the name of the object that broke
- cLux_AddDebugMessage("The bottle broke");
- }
- void OnLookAt_Door_1(const tString &in asEntity, int alState)
- {
- //asEntity is the name of the object that is being looked at or not looked at
- if(alState == 1){
- //This stuff will happen when the player is looking at the door
- cLux_AddDebugMessage("Player is looking at the door");
- }else{
- //This stuff will happen when the player is not looking at the door
- cLux_AddDebugMessage("Player is not looking at the door");
- }
- }
- void OnInteract_Player_Door_1(const tString &in asEntity)
- {
- //asEntity is the name of the object that is being interacted with
- cLux_AddDebugMessage("Player interacted with the door");
- }
- void OnConnectionStateChange_Candle_1(const tString &in asEntity, int alState)
- {
- //asEntity is the name of the object that had its state changed
- if(alState == 1){
- //This stuff will happen when the candle is turned on
- cLux_AddDebugMessage("Candle just turned on");
- }
- if(alState == 0){
- //This stuff will happen when the candle is switching between on and off
- cLux_AddDebugMessage("Candle just changed states");
- }
- if(alState == -1){
- //This stuff will happen when the candle is turned off
- cLux_AddDebugMessage("Candle just turned off");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement