Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Ice Sliding Puzzle in RMVX

Hello guys and girls.

Just a quick question really. I am making an ice dungeon, as the first, beginner's, dungeon of my current RMVX game.
However, I have encountered a few issues with making a puzzle.

Who ever played pokemon gold/silver/crystal? Remember that cave that led to the city for the eighth gym?
Where you walked forward and slid across until you hit a block or a wall? You then had to navigate your way to an exit?
Yeah, well I do, and I remember how frustrated (a little kid here) I was with it, and yet how fun it was to play at the same time. Gameplay wise, I would really hope to mimic this in my game. But here is where my issue comes in.

I want to make this type of puzzle, but I really can't without the thing lagging like hell... And I want to make a big one. A real big one.
I'm pretty sure that a common event should be used here, so I am asking if someone could give me a sample of this event.
I am usually good at things like this, but this one has gone over my head. I have had countless attempts, and hopefully somebody here can help me now.

Thanks in advance.

~Brad


EDIT: http://i191.photobucket.com/albums/z317 ... /event.jpg[/img]

Okay, I have this so far but there are two problems.
1- It doesn't stop sliding when I turn the switch off (when you slide off the ice)
and 2- You can move left and right whilst you are sliding.

How would I fix these two errors?
 
One method you could try is by switch. Turn on any switch on a Player Touch event by the ice (remember to have another one that turns it off if you leave the ice). Create a Common Event with the aforementioned Condition switch, and simply have four Conditional Branches like so:

Code:
@>Conditional Branch: [Down] Key is Pressed
  @>Set Move Route: Player, Repeat, Ignore if Can't Move
                    :$>Move Down

If you repeat that for all directions, it should work.
 
Not really; since the movement is set to "Ignore if Can't Move", the player should automatically stop when he/she hits a rock or wall. You don't even need to create events for that, just use tiles from the tileset. In theory it should work fine.

If you want a different solution to doing this, though, you can search for an ice sliding script using Terrain Tags in the Script Analysis, I'm sure there's one somewhere.
 
Ah... didn't think of that before. Okay, try these:

For the player to stop sliding after going off the ice, in the Player Touch event that turns off the switch, add a "Set Move Route: Player" and leave it blank.

To stop the player from moving in another direction while on ice, try adding a "Wait for Move's Completion" in each of the Conditional Branches. This might freeze, however, if you have other events with "Custom" move routes.
 
Regi":2xkffjat said:
To stop the player from moving in another direction while on ice, try adding a "Wait for Move's Completion" in each of the Conditional Branches. This might freeze, however, if you have other events with "Custom" move routes.

It doesn't quite work that way. You can only have two checkboxes checked at the same time, and for him to check the "Wait for Completion" box, it'd automatically uncheck the "Repeat Action" box.
 
@Glitchfinder: Yeah, but I think the OP stated that it lagged and so requested a different method. It really depends on the size of the map, if you have a huge area of ice it won't work too well.

@Kylebot2000: Hmm, I see... I don't use VX so I suppose it's different from XP's commands.

Well, another method is to check the "Wait for Completion" box, and instead of using "Repeat Action", have somewhere between 10-20 "Move [Direction]"s with the "Ignore if Can't Move" box checked.
 
Regi":se868hql said:
@Glitchfinder: Yeah, but I think the OP stated that it lagged and so requested a different method. It really depends on the size of the map, if you have a huge area of ice it won't work too well.

@Kylebot2000: Hmm, I see... I don't use VX so I suppose it's different from XP's commands.

Well, another method is to check the "Wait for Completion" box, and instead of using "Repeat Action", have somewhere between 10-20 "Move [Direction]"s with the "Ignore if Can't Move" box checked.

There's another problem that lies in that, in which I found out through testing. What stops the player once they're off the ice? Sure, the "IiCM" box is checked, but the player will still more 10-20 directions if there's no switch that can stop it. (I can't seem to stop it myself...)
 
if you want a super easy way to do this using terrain tags try this, this is using XP though:

make a common event (parallell, using switch X) with this:
http://img.photobucket.com/albums/v463/ ... eslide.png[/img]

Then just simply go to your tilesets, clock terrain tags, and make it 3. I used the ice autotile, but you can make it anything, and use any terrain tag you want. :]
http://img.photobucket.com/albums/v463/ ... slide2.png[/img]

simply flip youur switch on at the start of your game and you never have to worry about it again.
 
I already suggested above, try using a "Set Move Route: Player" (leave it blank, it just stops all movement) in a Player Touch event when you leave the ice. If that doesn't work, another method you can try is using terrain tags and checking that with Conditional Branches (like lordnick posted above), or by checking the player's coordinates.

EDIT @lordnick: That's a pretty handy method too, except you forgot a "Control Variables: [0001] = Player's Terrain Tag" at the beginning of the CE.
 
Nickster":2rmn41gn said:
if you want a super easy way to do this using terrain tags try this, this is using XP though:

make a common event (parallell, using switch X) with this:
http://img.photobucket.com/albums/v463/ ... eslide.png[/img]

Then just simply go to your tilesets, clock terrain tags, and make it 3. I used the ice autotile, but you can make it anything, and use any terrain tag you want. :]
http://img.photobucket.com/albums/v463/ ... slide2.png[/img]

simply flip youur switch on at the start of your game and you never have to worry about it again.
I wish I was using XP then. But hang on...



Yeah, I did try the 10 or 20 move forward commands. However it froze...
But that was with my old method. I'll try it now.

EDIT: Yeah, I tried it, and it works perfectly... except not 100% of the time. For some reason the player will only move one space sometimes, or about three or four, or the whole way. I'm gunna leave this as unsolved as obviously people are discussing it, as there are many ways and opinions to do it. Who knows, maybe we can come up with a great one?
 
Regi":pk3vovpk said:
I already suggested above, try using a "Set Move Route: Player" (leave it blank, it just stops all movement) in a Player Touch event when you leave the ice. If that doesn't work, another method you can try is using terrain tags and checking that with Conditional Branches (like lordnick posted above), or by checking the player's coordinates.

EDIT @lordnick: That's a pretty handy method too, except you forgot a "Control Variables: [0001] = Player's Terrain Tag" at the beginning of the CE.

There are no such thing as terrain tags in VX, so this method doesn't work for TC.
 
Okay. So, so far we have tried a lot. What seems to work the best is where you skip if cannot be completed, and you also ignore if you cannot move on the move route system. But then you repeat the command Move in X direction a load of times. This works perfectly, however, sometimes you just stop. I do not know why, and I will post a screeny tonight.
Thanks for helping everyone.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top