Hi, I need help with making Knuckles climb and glide in Damizeans' crouching, rolling, and spindash 360 engine for GM 6.1. I have been trying to make Knuckles grind for some months. My last attempt was using Damizean's and Rougeyoshi's X-Mas Sonic engine, and changing the movement scripts with the ones in my engine. And that attempt failed fully. Here is what I did.
ScrPlayerActionGlide()
// ==== FUNCTION ==================================================================== // scrPlayerActionGlide() // ================================================================================== // // If no key is pressed, decelerate on current direction value if (key_left) GlideDirection = -1; if (key_right) GlideDirection = 1; if ((x_speed < GlideInitialSpeed) && (GlideDirection == 1)) x_speed += GlideDirChangeAcc; else if ((x_speed > -GlideInitialSpeed) && (GlideDirection == -1)) x_speed -= GlideDirChangeAcc; else x_speed += GlideAcceleration*GlideDirection; // If gravity is greater than cap value, decelerate gravity itself if (Gravity > GlideGravityCap) Gravity = max(Gravity-GlideGravityDec, GlideGravityCap); if (Gravity < GlideGravityCap) Gravity = min(Gravity+GlideGravityDec, GlideGravityCap); // If character collides within a wall, switch to climb if (player_collision_right(x,y, angle, maskBig) && x_speed >=0) { scrPlayerMotionClimb(); animation_direction = 1; //FlagsAllowCommonInput = false; SS_PlaySound(global.snd_grab) } if (player_collision_left(x,y, angle, maskBig) && x_speed <=0) { scrPlayerMotionClimb(); animation_direction = -1; //FlagsAllowCommonInput = false; SS_PlaySound(global.snd_grab) } // If touched the ground, change to glide slide if (ground == true) { action = action_glideslide; } // If we aren't holding the key action, drop if (!key_action) { action = action_glidefall; x_speed = scrClampValue(x_speed, -GlideFallSpeed, GlideFallSpeed); Gravity = GlideFallGravity; //FlagsAllowCommonInput = true;[/CODE] ScrPlayerActionGlideFall [CODE]// ==== FUNCTION ==================================================================== // scrPlayerActionGlideFall() // ================================================================================== // if (ground == true) { action = action_normal; }[/CODE] ScrPlayerActionGlideSlide [CODE]// ==== FUNCTION ==================================================================== // scrPlayerActionGlideSlide() // ================================================================================== // if (ground == true) { // Decelerate while on ground if (x_speed > 0) x_speed = max(Speed-GlideSlideDeceleration, 0); if (x_speed < 0) x_speed = min(Speed+GlideSlideDeceleration, 0); // Check out if character should stop sliding if (x_speed == 0.0) { action = action_normal; //FlagsAllowCommonInput = true; } //if (key_action_pressed) { // scrPlayerMotionJumping(); //FlagsAllowCommonInput = true; //} }[/CODE] ScrPlayerActionClimb [CODE]// ==== FUNCTION ==================================================================== // scrPlayerActionClimb() // ================================================================================== // // ---- Change climb motion on press --------------------------------------------- ClimbMotion = 0; if (key_up && !player_collision_top(x,y, angle, maskBig)) ClimbMotion = -1; if (key_down) ClimbMotion = 1; // ---- Stick to wall if possible ------------------------------------------------ if ((animation_direction == -1) && player_collision_left(x,y, angle, maskBig)) { repeat(15) { if (player_collision_left(x,y, angle, maskBig)==false) { x -= global.CosTable[global.GravityAngle]; y += global.SinTable[global.GravityAngle]; } else break; } } if ((animation_direction == 1) && player_collision_right(x,y, angle, maskBig)) { repeat(15) { if (player_collision_right(x,y, angle, maskBig)==false) { x += global.CosTable[global.GravityAngle]; y -= global.SinTable[global.GravityAngle]; } else break; } } // ---- If action pressed, jump -------------------------------------------------- if (KeyActionPressed) { scrPlayerMotionClimbJump(); //FlagsAllowCommonInput = true; //FlagsAllowDoubleJumpAction = true; } else { switch(animation_direction) { case -1: if (player_collision_left(x,y, angle, maskBig)==false) { action = action_jumping; //FlagsAllowCommonInput = true; } //if (scrPlayerCollisionLeftLimiter(scrWrapAngle(global.GravityAngle-90))==false) { //action = action_; //FlagsAllowCommonInput = true; } break; case 1: if (player_collision_right(x,y, angle, maskBig)==false) { action = action_jumping; //FlagsAllowCommonInput = true; } //if (scrPlayerCollisionRightLimiter(scrWrapAngle(global.GravityAngle+90))==false) { // action = action_climbrise; //FlagsAllowCommonInput = true; //} break; } if (ground == true) { action = action_normal; //FlagsAllowCommonInput = true; }[/CODE] Step Event for Knuckles Action 1: [CODE]if (key_melee && ground == false && action == action_jumping) scrPlayerActionGlide() [/CODE] The problem is that When the glide button is pressed it doesn't even work. And climbing is wacky when collided with a wall. Any help please? Thanks, Ice Cream Kid