Jump to content
A 2021 backup has been restored. Forums are closed and work in progress. Join our Discord server for more updates! ×
SoaH City Message Board

[GM7-Pro] Sky Chase Level


Recommended Posts

In my game, I'm going to have a Sky Chase level in it. I have gotten the sprites and the cloud parallax correct, but with the movement, I need some help. I have tried making the plane a side object to Sonic, meaning that the plane will follow Sonic's every movement, but it only caused Sonic to get stuck to the plane permanently, and the plane's x and y coordinates always stay right on top of Sonic. Help would really be appreciated if anyone knows how to do this the right way.

Link to comment
Share on other sites

I don't see how this could possibly be a problem. Actually, I had a sky chase esque segment in the 07 build of Nexus which included a number of different actions the plane did to accomodate Sonic's movement. Most of the time, it was the plane controlling Sonic's X, but at the end of the fight it let Sonic move freely.

Could you describe the code you have now though? I mean, it should be as simple as having the plane's x coordinate constantly set the the x-coordinate of your Sonic character and having an offset value to make sure he stays on the wing rather than another piece of the plane. If you are controlling the plane's y coordinate similarly, that's probably not such a great move. Instead, set an initial y position below the player's and once you have the player landing on the plane with it being able to go left and right, add actions to control the plane's up and down by using the conditions of holding up+Sonic's bottom sensor overlaps the plane's wing... you get the picture.

  • Like 1
Link to comment
Share on other sites

Thanks DW. I did what you said and it came out great, so rep+.

It was common sense though, so that's dumbness on my behalf. All I had to do was this:

Step event for objTornado:

if (global.can_fly != 0){
hspeed = objSonic.x_speed
}
else
exit;
[/CODE]

For the press up and down events for the plane, I just got it to set the vspeed to either 1 or -1 depending on whats pressed.

The can_fly variable is used to tell it whether or not the plane should stay with the character or not.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...