TechOFreak

Episode 16 Functions

Dec 7th, 2020
801
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 3.40 KB | None | 0 0
  1. //From my Amnesia Rebirth Tutorial Series
  2. //Episode 16 Enemies Pt.6! Ghoul Callbacks!
  3. //https://www.youtube.com/playlist?list=PL4KkjlmOwLwwMVqedCNpi6caUxhgyf8Qr
  4. //-----------------------------------------------------------
  5.  
  6. //When the specified ghoul is alerted, call a function to run
  7. Ghoul_SetCallback_Alerted("ghoul_hallway", "OnGhoulAlerted_GhoulHallway");
  8. //ghoulName (String)- name of ghoul as it appears in your level editor.
  9. //functionName (String)- name of the function to call.
  10.  
  11. //Syntax for Ghoul_SetCallback_Alerted callback
  12. void OnGhoulAlerted_GhoulHallway(const tString &in asEntity){
  13.     cLux_AddDebugMessage("Ghoul Alerted");
  14. }
  15.  
  16. //When the specified ghoul enters a hunt state, call a function to run
  17. Ghoul_SetCallback_EnterHunt("ghoul_hallway", "OnEnterHunt_GhoulHallway", false);
  18. //ghoulName (String)- name of ghoul as it appears in your level editor.
  19. //functionName (String)- name of the function to call.
  20. //autoDisable (bool)- should this callback be disabled after the first run (false to run every single time).
  21.  
  22. //Syntax for Ghoul_SetCallback_EnterHunt callback
  23. void OnEnterHunt_GhoulHallway(){
  24.     cLux_AddDebugMessage("Ghoul is hunting");
  25. }
  26.  
  27. //When the specified ghoul enters the idle state, call a function to run
  28. Ghoul_SetCallback_EnterIdle("ghoul_hallway", "OnEnterIdle_GhoulHallway", false);
  29. //ghoulName (String)- name of ghoul as it appears in your level editor.
  30. //functionName (String)- name of the function to call.
  31. //autoDisable (bool)- should this callback be disabled after the first run (false to run every single time).
  32.  
  33. //Syntax for Ghoul_SetCallback_EnterIdle callback
  34. void OnEnterIdle_GhoulHallway(){
  35.     cLux_AddDebugMessage("Ghoul is idle");
  36. }
  37.  
  38. //When the specified ghoul finishes throwing the player, call a function to run
  39. Ghoul_SetCallback_ThrowAnimationOver("ghoul_hallway", "OnThrowFinished_GhoulHallway", false);
  40. //ghoulName (String)- name of ghoul as it appears in your level editor.
  41. //functionName (String)- name of the function to call.
  42. //autoDisable (bool)- should this callback be disabled after the first run (false to run every single time).
  43.  
  44. //Syntax for Ghoul_SetCallback_ThrowAnimationOver callback
  45. void OnThrowFinished_GhoulHallway(){
  46.     cLux_AddDebugMessage("Throw finished");
  47. }
  48.  
  49. //When the specified ghoul emerges from a hole, call a function to run
  50. Ghoul_SetCallback_EmergeCompleted("ghoul_hallway", "OnEmergeCompleted_GhoulHallway", false);
  51. //ghoulName (String)- name of ghoul as it appears in your level editor.
  52. //functionName (String)- name of the function to call.
  53. //autoDisable (bool)- should this callback be disabled after the first run (false to run every single time).
  54.  
  55. //Syntax for Ghoul_SetCallback_EmergeCompleted callback
  56. void OnEmergeCompleted_GhoulHallway(const tString &in asGhoul, const tString &in asHole){
  57.     cLux_AddDebugMessage("Emerge completed");
  58. }
  59.  
  60. //When the specified ghoul enters a hole, call a function to run
  61. Ghoul_SetCallback_EnterHideInHole("ghoul_hallway", "OnEnterHole_GhoulHallway", false);
  62. //ghoulName (String)- name of ghoul as it appears in your level editor.
  63. //functionName (String)- name of the function to call.
  64. //autoDisable (bool)- should this callback be disabled after the first run (false to run every single time).
  65.  
  66. //Syntax for Ghoul_SetCallback_EnterHideInHole callback
  67. void OnEnterHole_GhoulHallway(const tString &in asGhoul, const tString &in asHoleName){
  68.     cLux_AddDebugMessage("Hole entered");
  69. }
Advertisement
Add Comment
Please, Sign In to add comment