TechOFreak

Episode 17 Functions

Dec 9th, 2020
1,065
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.92 KB | None | 0 0
  1. //From my Amnesia Rebirth Tutorial Series
  2. //Episode 17 Enemies Pt.7! Wildcards, Retreating and Threatening!
  3. //https://www.youtube.com/playlist?list=PL4KkjlmOwLwwMVqedCNpi6caUxhgyf8Qr
  4. //-----------------------------------------------------------
  5.  
  6. //Set entities active or inactive (wildcard supported)
  7. Entity_SetActive("bedouin_basket_wicker_*", false);
  8. //entityName (String)- name of entity, you can specify multiple entities with the same name by using a wildcard (*)
  9. //setActive (bool)- should it be set active or not (true or false)
  10.  
  11. //Set the brightness of a light (wildcard supported)
  12. Light_SetBrightness("light_*", 0.0f);
  13. //lightName (String)- name of light, you can specify multiple lights with the same name by using a wildcard (*)
  14. //brightness (float)- the brightness value that the light should be set to
  15.  
  16. //Have a ghoul retreat to a specified area
  17. Ghoul_CommandRetreat_Execute("ghoul_hallway", false, false, Map_GetEntity("retreat_area_1").GetPosition(), "OnRetreatCompleted_GhoulHallway");
  18. //ghoulName (String)- name of ghoul as it appears in your level editor.
  19. //forceModeChange (bool)- should the ghoul immediately switch into the new state or should he do it at the next best opportunity.
  20. //autoRetreat (bool)- should the ghoul retreat automatically without specifying a spot.
  21. //vectorPosition (cVector3f)- the vector that specifies the position that the ghoul will retreat to (only required if autoRetreat is false).
  22. //completedCallback (String)- name of the function that should be called when this command finishes executing.
  23.  
  24. //Syntax for Ghoul_CommandRetreat_Execute completed callback
  25. void OnRetreatCompleted_GhoulHallway(const tString &in asEntity){
  26.     cLux_AddDebugMessage("Ghoul retreat successful");
  27. }
  28.  
  29. //Aggro a ghoul and have them go after the player  
  30. Ghoul_CommandThreatenPlayer_Execute("ghoul_hallway", 7, true, false, -1, -1, false, "OnThreatenCompleted_GhoulHallway");
  31. //ghoulName (String)- name of ghoul as it appears in your level editor.
  32. //aggroLevel (int)- level of aggresivenes  from 0 - 7
  33. //threatenGesture (bool)- should the ghoul do its threthen gesture.
  34. //slowDown (bool)- should the ghoul slow down prior to reaching the player.
  35. //minSlowDownDistance (float)- the minimum distance at which the ghoul should start to slow down relative to the player (only required if slowDown is true, -1 otherwise).
  36. //maxSlowDownDistance (float)- the maximum distance at which the ghoul should start to slow down relative to the player (only required if slowDown is true, -1 otherwise).
  37. //forceModeChange (bool)- should the ghoul immediately switch into the new state or should he do it at the next best opportunity.
  38. //completedCallback (String)- name of the function that should be called when this command finishes executing.
  39.  
  40. //Syntax for Ghoul_CommandThreatenPlayer_Execute completed callback
  41. void OnThreatenCompleted_GhoulHallway(const tString &in asEntity){
  42.     cLux_AddDebugMessage("Ghoul threaten completed");
  43. }
Advertisement
Add Comment
Please, Sign In to add comment