Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //From my Amnesia Rebirth Tutorial Series
- //Episode 35 Permafail! Respawning!
- //https://www.youtube.com/playlist?list=PL4KkjlmOwLwwMVqedCNpi6caUxhgyf8Qr
- //-----------------------------------------------------------
- ///////////////////////////////////////////////////
- // Global Variables Created
- //////////////////////////////////////////////////
- //Create a variable to store our checkpoints
- tString permaFailCheckpoint = "PermaFail_Default";
- //Create a variable to store our ghouls vector coordinates
- cVector3f ghoulHallwaySpawnPos;
- ///////////////////////////////////////////////////
- // Functions used in today's episode
- //////////////////////////////////////////////////
- //This function is automatically called when the player permafails (after the player's screen goes black)
- bool OnPermaFail()
- {
- return true;
- }
- //This function is automatically called when the player respawns after permafailing (after respawn cutscene)
- bool OnPermaFailRespawn()
- {
- return true;
- }
- //Set the ghoul to auto kill/permafail the player
- Ghoul_SetInstantKill("ghoul_hallway", true);
- //ghoulName(String) - name of the ghoul.
- //instantKill(bool) - should the ghoul instant kill (true or false).
- //Set the location the player should respawn if they permafail
- FearHandler_SetPermaFailRespawnArea(permaFailCheckpoint);
- //permaFailArea(String) - the name of the permafail area as it appears in the level editor.
- //Gets the entity object from the string name of an entity
- Map_GetEntity("ghoul_hallway");
- //entityName(String) - name of the entity as it appears in your level.
- //Set 1 or more doors to be completed closed
- SwingDoor_SetClosed("door_*", true, false);
- //doorName(String) - name of the door as it appears in the level editor(wildcards allowed for specifying more than 1 entity).
- //closed(bool) - should the door be closed or open (true or false).
- //effects(bool) - should any door specific effects play (true or false).
- //Create a collide callback between 2 entities
- Entity_AddCollideCallback("player", "trigger_bottom_stairs", "OnCollide_Player_TriggerBottomStairs");
- //parentEntity(String) - the name of 1 of the entities that will be colliding (they will become the parent).
- //childEntity(String) - the name of 1 of the entities that will be colliding (they will become the child).
- //functionName(String) - the name of the function to call when the 2 entities collide.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement