Information about object: obj_player1
Sprite: spr_player1
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent:
Children:
Mask:
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent:
Children:
Mask:
No Physics Object
Step Event:
execute code:
if (keyboard_check(ord('W'))) {y-=5;} //move up
if (keyboard_check(ord('S'))) {y+=5;} //move down
if y<0 y=0;//stop going off top
if y>room_height y=room_height; //stop going off bottom
Information about object: obj_player2Sprite: spr_player2
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent:
Children:
Mask: No Physics ObjectStep Event:execute code: if (keyboard_check(vk_up)) {y-=5;} //move up if (keyboard_check(vk_down)) {y+=5;} //move down if y<0 y=0;//stop going off top if y>room_height y=room_height; //stop going off bottomInformation about object: obj_wallSprite: spr_wall
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent:
Children:
Mask: No Physics ObjectInformation about object: obj_pongSprite: spr_pong
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent:
Children:
Mask: No Physics ObjectCreate Event:execute code: motion_set(45,3);Step Event:execute code: if x<0//check if off left of screen { show_message("player 2 wins"); game_restart(); } if x>room_width//check if off right of screen { show_message("player 1 wins"); game_restart(); }Collision Event with object obj_player1:execute code: hspeed*=-1;Collision Event with object obj_player2:execute code: hspeed*=-1;Collision Event with object obj_wall:execute code: vspeed*=-1;