Advertisement
Guest User

crouching

a guest
Mar 6th, 2016
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2.  ZDoom makes crouching half the player height.
  3.  Doomguy is 56 units tall. (And his ViewHeight is 41 because fuck proportions, apparently)
  4.  So by default, Crouch Height is 28 units. Here, the height is set to 32, making his crouch height 16.
  5.  In actual application you might want to add a line to change the View height accordingly, as well.
  6.  I also don't know if this will work. I probably should have tested it, but drunk so no sorry.
  7.  Love, anon
  8. */
  9. Script 1 ENTER
  10. {
  11.     int keypress;
  12.     while (TRUE)
  13.     {
  14.         keypress = GetPlayerInput(-1, INPUT_BUTTONS);
  15.         if (keypress == BT_CROUCH)
  16.         {
  17.             SetActorProperty(0, APROP_Height, 32)
  18.         }
  19.         else
  20.         {
  21.             SetPlayerProperty(0, APROP_Height, 56);
  22.         }
  23.         delay(1);
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement