Advertisement
TechOFreak

Episode 14 Functions

Dec 2nd, 2020
811
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 3.76 KB | None | 0 0
  1. //From my Amnesia Rebirth Tutorial Series
  2. //Episode 14 Enemies Pt.4! Guarding, Enthralled and Wander!
  3. //https://www.youtube.com/playlist?list=PL4KkjlmOwLwwMVqedCNpi6caUxhgyf8Qr
  4. //-----------------------------------------------------------
  5.  
  6. //Should the ghoul smell around for the player
  7. Ghoul_SetSmellingActive("ghoul_hallway", false);
  8. //enemyName (String)- name of enemy as it appears in the level editor.
  9. //enable (bool)- whether or not you want to set the ghoul to smell for the player (true or false).
  10.  
  11. /////////////////////////////////////////////
  12. //Guarding functions
  13. /////////////////////////////////////////////
  14.  
  15. //Setup the guard mode
  16. Ghoul_ModeGuard_Setup("ghoul_hallway", "arabic_fort_door_exit_1", "basket_1", "", "", "", eGhoulSpeed_FastWalk);
  17. //enemyName (String)- name of enemy as it appears in the level editor.
  18. //lookAtEntity (String)- name of entity that the ghoul should look at (as it appears in your level editor).
  19. //standAtEntity (String)- name of the entity that the ghoul should stand at (as it appears in your level editor).
  20. //idleAnimation (String)- name of animation that should play when the ghoul is idle near the entity.
  21. //idleSound (String)- name of the sound you want to play when the ghoul is idle.
  22. //disturbAnimation (String)- name of the animation you want to play when the ghoul'f guarding is disturbed.
  23. //ghoulSpeed (eGhoulSpeed)- the speed at which the ghoul should move while guarding.
  24.  
  25. //Set the mode to be in the guard state
  26. Ghoul_Mode_Set("ghoul_hallway", eGhoulMode_Guard, false);
  27. //ghoulName (String)- name of ghoul as it appears in your level editor.
  28. //ghoulMode (eGhoulMode)- the mode we want the ghoul to be in eGhoulMode_Guard for a guard state.
  29. //forceModeChange (bool)- should the ghoul immediately switch into the new state or should he do it at the next best opportunity.
  30.  
  31. /////////////////////////////////////////////
  32. //Enthralled functions
  33. /////////////////////////////////////////////
  34.  
  35. //Setup the enthralled mode
  36. Ghoul_ModeEnthralled_Setup("ghoul_hallway", "basket_1", "basket_1", "idle_stand");
  37. //ghoulName (String)- name of ghoul as it appears in your level editor.
  38. //lookAtEntity (String)- name of entity that the ghoul should look at (as it appears in your level editor).
  39. //standAtEntity (String)- name of the entity that the ghoul should stand at (as it appears in your level editor).
  40. //idleAnimation (String)- name of animation that should play when the ghoul is idle near the entity.
  41.  
  42. //Set the mode to be in the guard state
  43. Ghoul_Mode_Set("ghoul_hallway", eGhoulMode_Enthralled false);
  44. //ghoulName (String)- name of ghoul as it appears in your level editor.
  45. //ghoulMode (eGhoulMode)- the mode we want the ghoul to be in eGhoulMode_Enthralled for a enthralled state.
  46. //forceModeChange (bool)- should the ghoul immediately switch into the new state or should he do it at the next best opportunity.
  47.  
  48. /////////////////////////////////////////////
  49. //Random wander area functions
  50. //Note: you can use a vector with the
  51. //coordinates or specify an entities coordinates
  52. /////////////////////////////////////////////
  53.  
  54. //Setup the random wander area mode...
  55. Ghoul_ModeRandomWanderArea_Setup("ghoul_hallway", cVector3f(15.5, 0, 1.101), 0, 5);
  56.  
  57. //You can also use if you want to specify an entities coordinates instead
  58. Ghoul_ModeRandomWanderArea_Setup("ghoul_hallway", Map_GetEntity("basket_1").GetPosition(), 0, 5);
  59. //ghoulName (String)- name of ghoul as it appears in your level editor.
  60. //position3D (cVector3f)- the x,y and z coordinate vector to use. This will be the origin point that the ghoul will wander around.
  61. //minRadius (float)- the minimum distance from the coordinates provided that the ghoul should start wandering.
  62. //maxRadius (float)- the maximum distance from the coordinates provided that the ghoul should start wandering.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement