Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Variables
- x = obj_player.x
- y = obj_player.y
- xOff_temp = -50 //movement to max pan
- yOff_temp = 0
- Swipe2 = false;
- Swipe3 = false;
- //Step Event
- //Regular Movement Variables
- Key_Left = keyboard_check_direct (vk_left);
- Key_Right = keyboard_check_direct (vk_right);
- Key_Attack = keyboard_check_pressed (ord('X'));
- //Regular Movement
- if (Key_Left)
- {
- image_xscale = -1;
- x = obj_player.x + xOff_temp
- }
- else
- {
- if (Key_Right)
- {
- image_xscale = 1;
- x = obj_player.x - xOff_temp
- }
- }
- y = obj_player.y + yOff_temp
- //Attacking
- if Key_Attack
- {
- sprite_index = player_djump
- Swipe2 = true;
- }
- else
- {
- if (Key_Attack) && (Swipe2 = true)
- {
- sprite_index = player_run;
- Swipe3 = true;
- }
- }
- if (Key_Attack) && (Swipe3 = true)
- {
- sprite_index = player_idle;
- }
- if Swipe2 = true
- {
- alarm[0]=-1 alarm = 60;
- }
- if Swipe3 = true
- {
- alarm[1]=-1 alarm = 60;
- }
- //Alarm0
- Swipe2 = false;
- //Alarm1
- Swipe2 = false;
- Swipe3 = false;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement