Advertisement
ijontichy

<stdin>

Jul 30th, 2012
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.50 KB | None | 0 0
  1. Script 3 (int PlayNum)
  2. {
  3. int pln = PlayerNumber();
  4. int isAlive;
  5. int x, z, vx, vz, cx, cz, input;
  6.  
  7. SetActivator(500+PlayNum);
  8.  
  9. while (isAlive)
  10. {
  11. x = GetActorX(0);
  12. z = GetActorZ(0);
  13. vx = GetActorVelX(0);
  14. vz = GetActorVelZ(0);
  15. cx = GetActorX(100+pln);
  16. cz = GetActorZ(100+pln);
  17. isAlive = GetActorProperty(0, APROP_Health) > 0;
  18.  
  19. ModY[pln] = -256.0;
  20.  
  21.  
  22. Input = GetPlayerInput(0, INPUT_BUTTONS);
  23.  
  24. if (Input & BT_MOVELEFT)
  25. {
  26. Angle[pln] = 0.5;
  27. ModZ[pln] = 32.0;
  28. DownFirst[pln] = False;
  29.  
  30. UpFirst[pln] = False;
  31. DownBuffer[pln] = 0;
  32. UpBuffer[pln] = 0;
  33. }
  34. else if (Input & BT_MOVERIGHT)
  35. {
  36. Angle[pln] = 1.0;
  37. ModZ[pln] = 32.0;
  38. DownFirst[pln] = False;
  39.  
  40. UpFirst[pln] = False;
  41. DownBuffer[pln] = 0;
  42. UpBuffer[pln] = 0;
  43. }
  44.  
  45. if (GetActorY(0) != LVL_YPOS && YSuspend[pln] == False)
  46. {
  47. SetActorPosition(0, GetActorX(500+pln),
  48. LVL_YPOS, GetActorZ(500+pln), 0);
  49. }
  50.  
  51. SetActorAngle(0, Angle[pln]);
  52.  
  53. if (Input & BT_LOOKUP && Pogo[pln] == false && isAlive)
  54. {
  55. UpBuffer[pln]++;
  56. }
  57.  
  58.  
  59. if (Input & BT_LOOKDOWN && Pogo[pln] == false && isAlive)
  60. {
  61. DownBuffer[pln]++;
  62. }
  63.  
  64. if (DownBuffer[pln] > 55)
  65. {
  66. if (DownFirst[pln] == False)
  67. {
  68. SetActorState(0, "LookDown", 0);
  69. DownFirst[pln] = True;
  70. ModZ[pln] = 0;
  71. }
  72.  
  73. if (ModZ[pln] > -96.0)
  74. {
  75. ModZ[pln] -= 4.0;
  76. }
  77.  
  78. }
  79.  
  80. if (UpBuffer[pln] > 55)
  81. {
  82. if (UpFirst[pln] == False)
  83. {
  84. SetActorState(0, "LookUp", 0);
  85. UpFirst[pln] = True;
  86. ModZ[pln] = 0;
  87. }
  88.  
  89. if (ModZ[pln] < 96.0)
  90. {
  91. ModZ[pln] += 4.0;
  92. }
  93.  
  94. }
  95.  
  96. SetActorPosition(100+pln, x, LVL_YPOS+ModY[pln], z+32.0+ModZ[pln], 0);
  97.  
  98. //Spawn("Shadow", 0, 0, 0, 900+pln, 0);
  99. //SetActorPosition(900+pln, x, LVL_YPOS, GetActorFloorZ(0), 0);
  100. //delay(LOOPTICS);
  101. }
  102. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement