Advertisement
TechOFreak

Episode 29 Functions

Jan 22nd, 2021
987
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.68 KB | None | 0 0
  1. //From my Amnesia Rebirth Tutorial Series
  2. //Episode 29 Prop and Player Force! Flying Jesus!
  3. //https://www.youtube.com/playlist?list=PL4KkjlmOwLwwMVqedCNpi6caUxhgyf8Qr
  4. //-----------------------------------------------------------
  5.  
  6.  
  7. //Apply force to the player
  8. Player_AddBodyForce(cVector3f(0,0,100000), false);
  9. //forceDirection (cVector3f)- the vector to apply the force cVector3f(x,y,z).
  10. //localCoordinates (bool)- should the force be applied relative to the rotation of the entity (false will be relative to the maps coordinates).
  11.  
  12. //Apply force to a swing door
  13. SwingDoor_PushOpen("door_1", 10, 3, 0.0);
  14. //doorName (String)- the name of your door as it appears in your level editor.
  15. //impulseStrength (float)- the ammount of force to apply to the door per impulse.
  16. //impulseAmount (int)- the number of impulses that should be applied.
  17. //impulseDelay (float)- the delay between each impulse.
  18.  
  19. //Make an entity in your level active or inactive
  20. Entity_SetActive("jesus_1", true);
  21. //entityName (String)- the name of your entity as it appears in your level editor.
  22. //activate (bool)- should the entity be set active (true) or inactive (false).
  23.  
  24. //Apply force to an entity in your map
  25. Entity_AddForce("jesus_1", cVector3f(-1000,0,0), false, false);
  26. //entityName (String)- the name of your entity as it appears in your level editor.
  27. //forceDirection (cVector3f)- the vector to apply the force cVector3f(x,y,z).
  28. //localCoordinates (bool)- should the force be applied relative to the rotation of the entity (false will be relative to the maps coordinates).
  29. //mainBodyOnly (bool)- should the force be applied to the main body of the object only (false will apply force to all joints and connections).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement