Guest User

Untitled

a guest
May 5th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2. Clicking the middle mouse button will show an arrow bubble in the direction of the mouse.
  3. -Made by Orpheon, concept by L.
  4. */
  5.  
  6. object_event_add(PlayerControl, ev_step, ev_step_begin, "
  7. var bubble;
  8.  
  9. if mouse_check_button(mb_middle) and !menuOpen and global.myself.object != -1
  10. {
  11.     if global.myself.object.aimDirection >= 45 and global.myself.object.aimDirection <= 135
  12.     {
  13.         // Up arrow
  14.         bubble = 40;
  15.     }
  16.     else if global.myself.object.aimDirection >= 135 and global.myself.object.aimDirection <= 225
  17.     {
  18.         // Left arrow
  19.         bubble = 37;
  20.     }
  21.     else if global.myself.object.aimDirection >= 225 and global.myself.object.aimDirection <= 315
  22.     {
  23.         // Down arrow
  24.         bubble = 39;
  25.     }
  26.     else
  27.     {
  28.         // Right arrow
  29.         bubble = 38;
  30.     }
  31.    
  32.     write_ubyte(global.serverSocket, CHAT_BUBBLE);
  33.     write_ubyte(global.serverSocket, bubble);
  34.     socket_send(global.serverSocket);
  35. }")
Add Comment
Please, Sign In to add comment