kann jemand den fehler entdecken?

  • GM 8
  • kann jemand den fehler entdecken?

    Ich verzweifle grad irgendwie an meinem Projekt( 2d multiplayer side shooter) nachdem ich nun mit großer Mühe die eineige Features richtig eingebaut hab muss ich mir das grundsystem irgendwie zerschossen haben . Genauergesagt meine Spieler wollen sich nicht mehr richtig bewegen z.b kleben sie am boden und wenn man springt springen sie bis zur decke und kleben daran nur in der luft lassen sie sich noch ein wenig steuern . Das seltsame ist : ich habe die codes mit einer alten version verglichen wo z.b die physik synchronisation noch nicht drinn war und dort läuft alles , obwohl die codes die selben sind. auch im singleplayer geht mit ähnlichren codes und den selben objekten(plattformen etc alles) ich weiß wirklich nicht wo ich noch suchen soll.
    hier mal die information aus meinem multiplayer player vieleicht kann jemand den fehler finden
    Spoiler anzeigen

    GML-Quellcode

    1. Information about object: obj_player_self
    2. Sprite: player01 right
    3. Solid: false
    4. Visible: true
    5. Depth: -1
    6. Persistent: false
    7. Parent: obj_player_parent
    8. Mask: <same as sprite>
    9. Create Event:
    10. set the sprite to player01 right with subimage 0 and speed 0
    11. set variable look to 1
    12. set variable leben to 50
    13. set variable tod to 0
    14. set variable last_hit to 10
    15. set Alarm 1 to 30
    16. execute code:
    17. xstart = x
    18. ystart = y
    19. Alarm Event for alarm 0:
    20. execute code:
    21. //Update position
    22. clearbuffer();
    23. writebyte(2);
    24. writebyte(global.myid);
    25. writeshort(x);
    26. writeshort(y);
    27. writeshort(sprite_index);
    28. writeshort(image_speed);
    29. writeshort(image_index);
    30. sendmessage(global.clienttcp);
    31. //Redo it
    32. alarm[0] = 1;
    33. execute code:
    34. clearbuffer();
    35. writebyte(22);
    36. writebyte(global.myid);
    37. writeshort(leben);
    38. writebyte(last_hit)
    39. sendmessage(global.clienttcp);
    40. Alarm Event for alarm 1:
    41. set variable leben relative to 5
    42. if leben is larger than 50
    43. set variable leben to 50
    44. set Alarm 1 to 90
    45. Step Event:
    46. if relative position (0,1) is collision free for Only solid objects
    47. set the gravity to 1 in direction 270
    48. else
    49. set the gravity to 0 in direction 270
    50. if vspeed is larger than 12
    51. set the vertical speed to 12
    52. if leben is smaller than 1
    53. if tod is equal to 0
    54. create instance of object dead_mp at relative position (0,0)
    55. set variable visible to false
    56. set variable tod to 1
    57. execute code:
    58. clearbuffer();
    59. writebyte(23);
    60. writebyte(global.myid);
    61. writestring(global.username);
    62. sendmessage(global.clienttcp);
    63. Collision Event with object obj_bullet_parent:
    64. if tod is equal to 0
    65. execute code:
    66. clearbuffer();
    67. writebyte(22);
    68. writebyte(global.myid);
    69. writeshort(leben);
    70. sendmessage(global.clienttcp);
    71. Collision Event with object explosion kiste:
    72. if tod is equal to 0
    73. execute code:
    74. clearbuffer();
    75. writebyte(22);
    76. writebyte(global.myid);
    77. writeshort(leben);
    78. writebyte(last_hit)
    79. sendmessage(global.clienttcp);
    80. set variable leben relative to -1
    81. set variable last_hit to 4
    82. Collision Event with object explosion fass:
    83. if tod is equal to 0
    84. execute code:
    85. clearbuffer();
    86. writebyte(22);
    87. writebyte(global.myid);
    88. writeshort(leben);
    89. writebyte(last_hit)
    90. sendmessage(global.clienttcp);
    91. set variable leben relative to -2
    92. set variable last_hit to 5
    93. Collision Event with object water_up:
    94. if vspeed is larger than 0
    95. set variable vspeed to vspeed*0.3
    96. set variable hspeed to hspeed*0.3
    97. Collision Event with object water:
    98. if vspeed is larger than 0
    99. set variable vspeed to vspeed*0.3
    100. set variable hspeed to hspeed*0.3
    101. Collision Event with object obj_parent_floor:
    102. for other object: if leben is smaller than 999
    103. move in direction 270 at most 12 till a contact with solid objects
    104. set the vertical speed to 0
    105. Collision Event with object kiste_ph:
    106. for other object: if leben is smaller than 999
    107. move in direction 270 at most 12 till a contact with solid objects
    108. set the vertical speed to 0
    109. Collision Event with object Fass_ph:
    110. for other object: if leben is smaller than 999
    111. move in direction 270 at most 12 till a contact with solid objects
    112. set the vertical speed to 0
    113. Keyboard Event for <Left> Key:
    114. for all obj_client: if running is equal to 1
    115. if tod is equal to 0
    116. if relative position (-4,0) is collision free for Only solid objects
    117. jump relative to position (-5,0)
    118. Keyboard Event for <Up> Key:
    119. for all obj_client: if running is equal to 1
    120. if tod is equal to 0
    121. if relative position (0,16) gives a collision with Only solid objects
    122. set the vertical speed to -15
    123. Keyboard Event for <Right> Key:
    124. for all obj_client: if running is equal to 1
    125. if tod is equal to 0
    126. if relative position (4,0) is collision free for Only solid objects
    127. jump relative to position (5,0)
    128. Other Event: Outside Room:
    129. if tod is equal to 0
    130. if y is larger than 64
    131. set variable leben to 0
    132. Draw Event:
    133. execute code:
    134. draw_sprite_corrected(sprite_index, image_index, x, y, image_xscale, image_yscale, image_angle, image_blend, image_alpha);
    135. at relative position (0,0) draw the value of: gravity
    136. Key Press Event for <Space> Key:
    137. for all obj_client: if running is equal to 1
    138. if tod is equal to 0
    139. if look is equal to 0
    140. create instance of object bullet02 at relative position (-13.5,2.51)
    141. else
    142. create instance of object bullet02 at relative position (11,2.51)
    143. Key Press Event for <Left> Key:
    144. for all obj_client: if running is equal to 1
    145. if tod is equal to 0
    146. set the sprite to player01 with subimage 0 and speed 0.3
    147. set variable look to 0
    148. Key Press Event for <Right> Key:
    149. for all obj_client: if running is equal to 1
    150. if tod is equal to 0
    151. set the sprite to player01 right with subimage 0 and speed 0.3
    152. set variable look to 1
    153. Key Release Event for <Left> Key:
    154. for all obj_client: if running is equal to 1
    155. if tod is equal to 0
    156. set the sprite to player01 with subimage 0 and speed 0
    157. set variable look to 0
    158. Key Release Event for <Right> Key:
    159. for all obj_client: if running is equal to 1
    160. if tod is equal to 0
    161. set the sprite to player01 right with subimage 0 and speed 0
    162. set variable look to 1
    Alles anzeigen
    :rage: