TechOFreak

Episode 39 Functions

Apr 14th, 2021
1,047
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //From my Amnesia Rebirth Tutorial Series
  2. //Episode 39 Randomness Pt.2!
  3. //https://www.youtube.com/playlist?list=PL4KkjlmOwLwwMVqedCNpi6caUxhgyf8Qr
  4. //-----------------------------------------------------------
  5.  
  6. bool RandomChance(int percentChance){
  7.     int randomNumber = cMath_RandRectl(1, 100);
  8.     if(randomNumber <= percentChance){
  9.         return true;
  10.     }
  11.     return false;
  12. }
  13.    
  14. SwingDoor_SetLocked("door_1", RandomChance(50), true);
  15.    
  16. Map_AddTimer("Timer_HallwayGhoulSpawn", cMath_RandRectf(1.0, 15.0), "OnTimer_HallwayGhoulSpawn");
  17.    
  18. Entity_SetActive("ghoul_hallway", RandomChance(50));
  19.  
  20. Entity_AddForce("bottle_1", cMath_RandRectVector3f(cVector3f(-10000.0f, 0.0f, -10000.0f), cVector3f(10000.0f, 10000.0f, 10000.0f)), false, false);
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×