Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ///Step Event
- if (keyboard_check(ord("L")) && ComboCount && CanAttack < array_length_1d(combo)){
- switch (ComboCount) {
- case 0 :
- if (image_angle = 1){
- sprite_index = combo[ComboCount];
- image_angle= 1;
- image_speed = 5;
- instance_create_depth(x+1,y,-10,obj_damage1);
- } else {
- sprite_index = combo[ComboCount];
- image_angle = -1;
- image_speed = 5;
- instance_create_depth(x-1,y,-10,obj_damage1);
- }
- break;
- case 1 :
- if (image_angle = 1){
- sprite_index = combo[ComboCount];
- image_angle= 1;
- image_speed = 5;
- instance_create_depth(x+1,y,-10,obj_damage1);
- } else {
- sprite_index = combo[ComboCount];
- image_angle = -1;
- image_speed = 5;
- instance_create_depth(x-1,y,-10,obj_damage1);
- }
- break;
- }
- CanAttack = !CanAttack;
- ComboCount ++;
- image_index = 0;
- }
- /// Create
- CanAttack = true;
- combo[0] = spr_player_attack1;
- combo[1] = spr_player_attack2;
- combo[2] = spr_player_attack3;
- ComboCount = 0;
- IdleSprite = spr_player_stand;
- ///Animation End
- if (CanAttack){
- sprite_index = spr_player_stand;
- CanAttack = !CanAttack;
- }
- if (ComboCount >= array_length_1d(combo)) {
- ComboCount = 0;
- }
Add Comment
Please, Sign In to add comment