Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //ai_update - called every frame for this character as a CPU
- if (ai_recovering){
- distY = y-get_stage_data( SD_Y_POS);
- if (x<get_stage_data( SD_X_POS)) {
- distX=get_stage_data( SD_X_POS)-x;
- } else {
- distX = x-(get_stage_data( SD_X_POS)+get_stage_data( SD_WIDTH));
- }
- if (move_cooldown[AT_FSPECIAL] == 0 && distX>150 && special_pressed==false){
- joy_pad_idle=false;
- up_down=false;
- down_down=false;
- if (x<get_stage_data( SD_X_POS)) {
- right_down=true;
- left_down=false;
- } else {
- right_down=false;
- left_down=true;
- }
- special_pressed=true;
- } else if (distX<=150 && special_pressed==false && attack!=AT_FSPECIAL) {
- joy_pad_idle=false;
- up_down=true;
- special_pressed=true;
- special_pressed=false;
- }
- if (state==PS_ATTACK_AIR && attack==AT_FSPECIAL){
- special_pressed=false;
- joy_pad_idle=false;
- if (x<get_stage_data( SD_X_POS)) {
- if (distY <-70){
- right_down=true;
- left_down=false;
- }
- else {
- joy_dir=45;
- }
- } else {
- if (distY <-70){
- right_down=false;
- left_down=true;
- }
- else {
- joy_dir=135;
- }
- }
- if (has_walljump){
- jump_down=true;
- }
- if (distX <0 && y>get_stage_data(SD_Y_POS)){
- special_pressed=true;
- }
- up_down=distY>distX;
- up_pressed=distY>distX;
- down_down=false;
- special_pressed=false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment