Advertisement
Guest User

movement

a guest
Jul 28th, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. @setlocal enableextensions enabledelayedexpansion
  2. @echo off
  3. title movement
  4. color 0a
  5.  
  6. set length=
  7. set height= a
  8.  
  9. :controls
  10. cls
  11. echo Use WASD to move your character ([]).
  12. echo.
  13. for %%a in ( %height% ) do echo.
  14. echo %length%[]
  15. choice /c wasd /n
  16. if %errorlevel% equ 1 call:up
  17. if %errorlevel% equ 2 call:left
  18. if %errorlevel% equ 3 call:down
  19. if %errorlevel% equ 4 call:right
  20.  
  21. :left
  22. set length=!length:~0,-1!
  23. goto controls
  24.  
  25. :right
  26. set length=%length%
  27. goto controls
  28.  
  29. :up
  30. set height=!height:~0,-2!
  31. goto controls
  32.  
  33. :down
  34. set height=%height% a
  35. goto control
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement