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

[Help] How to loop Y axis?


Recommended Posts

I want to make one Water Slide pretty much like that one in Labyrinth Zone by looping the Y Axis to give it and endless effect until the player does something to progress in the stage (like, for example, finding a switch and pressing it). The problem is that I don't have the slightest clue of how to do it. I think it's something along the lines of checking if the player is between two x positions and then when he reaches an y position he is sent back to the start, but I'm not very sure how to implement that in events. Can someone give me a little help?

Edit.: I forgot to mention. I already have the Water Slide gimmick, I just want to doo the axis Y looping.

Link to comment
Share on other sites

I think you pretty much described how to do it. While the player is in a certian X range, if they pass a certain Y range then trigger the loop. The issue here is that the ability to do it like the Genesis did probaby isn't at all possible in MMF2 or Gamemaker.

You'll need to synchronize the YFlip perfectly so that the player can't tell they just switched positions, which probably means you dont need to have any badnicks or anything near the Yflip area.

Link to comment
Share on other sites

It goes without saying, but the same also applies to X looping.

Also note: If you're using a parallax, you'll need to make sure that the loop positions (both end and beginning) are multiples of the parallaxer's height. (Or length, if you're doing an X loop.)

Link to comment
Share on other sites

Ok, I was able to do a Y loop without problems in an testing, "blank" application of mine. However, when I tried to test it in Worlds Delta, it didn't work for some reason. I used the default position values of the object "Player" to check where the player was and compare the X and Y values so it would be sent to a palce upthere (not synchronized, as I'm only testing it out by now). I may be totally wrong, but I think that Worlds stores those values in another place and that's the reason why it didn't work. Can anyone help?

Also, a screenshot of what I did here.

Thanks for the help and I'll thank you even more if you help me with this.

Link to comment
Share on other sites

It's stored as "FloatX" and "FloatY" in the Player Values object. (It's the blue octagon with an M on it.)

Modify those as you would an X or Y position, but do so at the same time as real X and Y positions.

Also, they're called "Float_" because they take decimals, while real positions won't.

Link to comment
Share on other sites

IT WORKED!!!

TailsSena, thank you very, very much! I would never have realized that I actually needed to set the two values (both the FloatX/Y and Position of X/Y) at the same time for the loop to work! Now I just need to synchronize everything so the loop will work nicely with the Water Slides and Parallax.

Really, thank you!

Link to comment
Share on other sites

Now I just need to synchronize everything so the loop will work nicely with the Water Slides and Parallax.

Aaaaaand that'd be the hard part.

The parallax part should be simple enough to resolve... you might just be able to shift the positional offset by the same amount as you are shifting the player position with the mod being something like the number of pixels per wrap or something like that. It'll probably take some experimenting. Actually, if you are legitimately shifting the right amount while on a water slide, you probably won't have any problems. If you can't get around it for some reason, I'd recommend faking it by just having the shaft go vertical at the loop point.

Link to comment
Share on other sites

I tried to use multiples of the parallaxer's height as the beginning and end positions of the loop, but it didn't work. I also tried setting the player position in the parallax (Alterable Value C of the parallax object) so the player position in the parallax would be the same as before coming back to the loop beginning, but when Sonic is sent back to the beginning, he strangely starts in the top of the screen (not frame, screen) and then switches to the screen position he was before coming back to the beginning, making the loop noticeable even if the parallax is set correctly, which is a great problem, and I don't have the slightest idea of how to fix it. It's difficult to even explain e.e

Agh, I think I'll give up on using Worlds and try using an simpler engine, then switch when I'm good enough. Everything is so much complicated... But thanks for all your help.

Link to comment
Share on other sites

A little update: I solved the screen problem:tgrin: . I just needed to do a small configuration in how the camera would work during the loop, and the parallax in a way it synchronizes nicely with that. For the parallax to synchronize, I needed to change the Alterable Value C in the parallax object (the one which is responsible for the player position in the parallax). Now it creates another bug: sooner or later, the parallax will "end", and the background will turn gray, without nothing. There should be a way to loop the parallax once it "ends", although I'm not sure how (but I'm trying to figure out). Someone knows a way of doing such thing?:ahuh:

Edit: I'm actually able of making the parallax last more time by setting the Y dimension of the Parallax Object to something high, and the maximum is 32767 (signed int, am I right? XD). Would be nice if I knew a way of making the P. O. loops itself e.e

Link to comment
Share on other sites

The parallax shouldnt be a problem, should it? IIRC in the stage sections in genesis sonic, if the stage has a looping axis then the background is very simple and without too many layers for complications. As long as moving sonic and updating his position are in the right order you should get no issues

Link to comment
Share on other sites

Actually, I just found a way of making the parallax not end without looping itself. I just duplicated it for a number of rows (I put 10, but I think 4 or 5 are enough), with it having an vertical size of 32767. That way, fi the first ends, the second takes place, and if the second ends, the third takes place, and it goes on that for more than 10 minutes. As 10 minutes is the time limit, there is 0% probability of the player reaching the end of the parallax, so the problem is solved. I'm sure there is another way around this though, but for now, I'll leave it like that as it's the way I want it to be.

Once again, thanks for all your help!

Link to comment
Share on other sites

  • Recently Browsing   0 members

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