Sliding bookcase?

Status
Not open for further replies.

TheseThoughtsIThink

The Martian Manhunter
Member
Joined
Aug 1, 2014
Messages
12
Reaction score
0
First Language
English
Primarily Uses
RMMV
So in the cutscene I'm making, I want this bookcase to slide left and reveal a doorway. I've seen some tutorials on rolling boulder puzzles and secret entrances, but they didn't really help with what I want. Moving boulders is pretty simple, but bookcases are two pieces and I can't seem to move them at the same time?? And the secret entrances tut basically just had the obstruction vanish and reveal the doorway, which just doesn't feel natural to me. If that's the only option, then alright, but I'd like it to move. I googled the hell out of it but that was all I could find.

I'm not sure if this is in the right place, and sorry if it's not; this is my first post in the forums. So, uh. Hi all.
 

Sharm

Pixel Tile Artist
Veteran
Joined
Nov 15, 2012
Messages
12,760
Reaction score
10,884
First Language
English
Primarily Uses
N/A
I'd just make a sprite with the moving animation.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,674
First Language
German
Primarily Uses
RMMV
If you have two events and want them moving at the same time, you need to set frequency to max and on the two move route commands, the first route has to be without wait for completion.
 

TheseThoughtsIThink

The Martian Manhunter
Member
Joined
Aug 1, 2014
Messages
12
Reaction score
0
First Language
English
Primarily Uses
RMMV
@Sharm: that sounds simple enough I guess but I'm very very new to this and don't even really know how to put in an animation like that, let alone make one.

@Andar: okay, I understand, but when I activate the first event the lower half moves and the upper half still doesn't. does it need a different kind of trigger or?? how do I tie the two together so they move as one?
 

xcom

Veteran
Veteran
Joined
Mar 13, 2013
Messages
241
Reaction score
59
First Language
English
Primarily Uses
I can answer this!  With pictures!!!

I'm guessing you want to do something like this:

Door hidden:

In this picture the door is hidden behind the shelf.

hidden off.jpg
Door shown:

In this picture the door is shown behind the shelf after it's been moved.

hidden on.jpg
This is pretty simple to do. 

For my example I had to make 6 events on the map with 2 tabs each.

hidden show events.jpg
Since the book shelf graphic is 4 squares big, I made 4 events each with one of the 4 sections of the bookshelf in it on tab one.

On the other 2 tabs, I had to leave the graphic blank since the bookcase is not in that spot yet.

Then in the contents of one of them, I set a event for the player. 

* The player goes to the bookshelf and gets a message that they see a switch in the shelf.

* The player gets a option to flip the switch.

* If the player chooses YES, they a switch turn ON (in this case I made switch 15 the event switch) and then the book shelf "moves".

When the player "flips the switch", then the 6 events are set to go to tab 2 which is set for condition "switch 15 = on"

On each of the events on tab 2, I have it set where I moved the book case graphic over 1 square. 

hidden script.jpg

hidden script tab 2.jpg
Did that make better sense?
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,674
First Language
German
Primarily Uses
RMMV
@XCOM: with your solution, the bookcase will "jump" to it's new position, it will not slide there.

@Andar: okay, I understand, but when I activate the first event the lower half moves and the upper half still doesn't. does it need a different kind of trigger or?? how do I tie the two together so they move as one?
Please post a screenshot of your event - all move commands for all parts should be on the same event page (which means they react to a single trigger, there will be no way to give them different triggers), but you need to have them in specific order to prevent them from blocking each other, and that order depends on the direction they should move in.
 

xcom

Veteran
Veteran
Joined
Mar 13, 2013
Messages
241
Reaction score
59
First Language
English
Primarily Uses
Okay, if you do want to see it move, try this instead.

You still need to set up 4 events, each with a section of the bookcase in it.

So in my earlier example, when the player flips the switch it runs a event that moves the bookcase.

hidden script ver 2.jpg
The MOVE ROUTE makes the 4 events move over 1 square to the left in my example. 

You may notice there's a door moving to!

You can't have (or at least I don't think you can) have 2 events starting on top of each other, but you can have them move through/on each other with the THROUGH command in the MOVE ROUTE.

So I have the hidden door start as a black square above the bookcase until the player flips the switch.

Then when the player "flips the switch", the autorun event starts.

The first line causes the "door" to quickly move in place.  Notice the TRANSPARENT ON and THROUGH ON command and the speed set to 6! 

You also have to make sure that the top 2 sections of the bookcase are set to PRIORITY: ABOVE CHARACTER.  So when the door moves into place, it slides "under" that bookcase tile.

Then bookcase itself slowly slides to the side, which then revels the door behind it.\

Another important thing, you need to make sure when you set the MOVE COMMANDS for the sections of the bookcase, (except for the very last one) that the WAIT FOR COMPLETION is left blank!  That way all the sections move together.  If you leave the WAIT FOR COMPLETION checked off, then the sections will move one at a time.

Did that help?
 
Last edited by a moderator:

TheseThoughtsIThink

The Martian Manhunter
Member
Joined
Aug 1, 2014
Messages
12
Reaction score
0
First Language
English
Primarily Uses
RMMV
this has gotten very complicated very fast

@xcom: the first part of your method works really well, even if it does make it "jump" into place. give me a minute and I'll try the new example, and get back to you.

@Andar: okay, I think the part I'm not getting is how do can I have both parts on the same event? this is the screenshot for the bottom half

since there can only be one graphic per event page, how can I get both halves of the bookcase together?

edit: I meant for that to be "move away from player" and I've changed it
 
Last edited by a moderator:

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
There is another way which is not complicated at all.

Create a character graphic of your bookcase.  If you have a spare 'door' graphic that you will not be using, put it there, and make sure that you fill in all the spaces i.e. 3 wide and 4 down, as if it were a door, though of course all the graphics will be identical, you are not 'animating' this.  Do not use the bookcase on the ordinary B-E tile sheet.  Use an ordinary graphic event to place your bookcase.  It will now be one event, and you won't have any complications about getting 2 events to move simultaneously.

Then use the ordinary 'door' event command - you can copy/paste from a door event you already have.  Edit it like this:

At the beginning put Direction Fix OFF

After the line "Turn up" put Direction Fix ON

Delete everything after that (i.e. the player step forward etc.)
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,674
First Language
German
Primarily Uses
RMMV
@Andar: okay, I think the part I'm not getting is how do can I have both parts on the same event? this is the screenshot for the bottom half
You set your move route command for "this event", but the set move route command can move any event, not only itself - the top left of the move route window contains a drop-down list that contains all events on the map, not only the default "this event".
See the picture from XCOM's post (#8) to see how the move routes might be made (there are other variants that will work as well)
 

TheseThoughtsIThink

The Martian Manhunter
Member
Joined
Aug 1, 2014
Messages
12
Reaction score
0
First Language
English
Primarily Uses
RMMV
@Andar: I had completely forgotten you could do that to be honest. But I still can't get it working and honestly I'm getting too tired to care. I got xcom's working and while it's not perfect I'm just gonna stick with that one for now. Maybe later after I get some more experience I can go back and try again. thank you so much for taking the time to help me though, I really appreciate it!

@ksjp17: oh man that is amazing simple. maybe later I'll look for some tuts on how to make your own sprites, I've never tried to before! thanks for the tip!

@xcom: I had some trouble getting the door event to move to the right place but I FIGURED IT OUT WOO! thank you so much, your pictures and instructions were really really helpful!

now I have to take a break from this before I throw my computer out the window...
 

TheseThoughtsIThink

The Martian Manhunter
Member
Joined
Aug 1, 2014
Messages
12
Reaction score
0
First Language
English
Primarily Uses
RMMV
@rachellouise: holy crap that is a cool door. yeah, I'll try it, thanks!
 

byrdbones

Ren
Veteran
Joined
Mar 8, 2013
Messages
101
Reaction score
38
First Language
English
Primarily Uses
What I've been doing for my game. Since I'm already doing parallax mapping, it doesn't take much effort to add a bookshelf in front of a door, and then duplicate the layer 3 or 4 times and have it slide slightly to the left or right. Then I save the bookcase images and have one do a show picture, parallel process, then when say when the player hits a switch or tries to slide it, it activates a switch that changes the fixed picture event to the next page, then erase picture, then shows the new one, then erase, then the last one and remains on that with a new parallel process. This gives it a simple slide animation, I usually do 4 on the slide, and add some quick wait commands between the erase picture, makes it look really smooth. Sounds kinda complicated, but it's really not. Once you do it for a few times, or in my case many times. It's quite simple. 
 
Here is a video that shows the outcome in my game.
 
Last edited by a moderator:

Tommy Gun

♩ ♪ ♫ ♬
Veteran
Joined
Jan 20, 2014
Messages
385
Reaction score
123
First Language
English
@ksjp17: oh man that is amazing simple. maybe later I'll look for some tuts on how to make your own sprites, I've never tried to before! thanks for the tip!
Here you go, TheseThoughtsIThink, I made a video tutorial for you. It's basically what ksjp17/xcom said, with maybe a few extra things in there:




Hope that helps! See my signature for a video on sprite formatting if you need to make your own graphic.

Edit: Oh, I realized you were talking about using two events because you didn't want to make a graphic. In that case, you can probably still use this technique, but you'd put the second event above the first, and make it move left instead of right. The only issue is that I have the "tunnel" where the top of the bookcase would be, and you can't have two events on the same spot in the editor.
 
Last edited by a moderator:

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
15,354
Reaction score
8,533
First Language
English
Primarily Uses
RMMV
I have a sliding bookcase in my game and I also made a character graphic for it. Only I just made all positions the same, set it as the event graphic, and had the event slide.

This is what I made. You're welcome to use it.

 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
What mlogan has given you is what you need for my suggestion.  Doing it the way I mentioned, the whole bookcase just slides one tile and requires no complicated eventing.
 

MechaStarfish

Villager
Member
Joined
Feb 4, 2015
Messages
8
Reaction score
0
First Language
English
Primarily Uses
I'm writing on this forum because It's a related problem.  When ever I import my new image of the bookshelf and choose it in the graphics box there is a small white box that appears on the top corner of the image.  Would anyone like to help please?    
 

TheseThoughtsIThink

The Martian Manhunter
Member
Joined
Aug 1, 2014
Messages
12
Reaction score
0
First Language
English
Primarily Uses
RMMV
I'm writing on this forum because It's a related problem.  When ever I import my new image of the bookshelf and choose it in the graphics box there is a small white box that appears on the top corner of the image.  Would anyone like to help please?
does it look like this?

helping1.PNG
if it does, change the file name of your bookcase so it has a $ in front, like "$filename". that changes how the program reads the file, so it treats it like a character sprite instead. the basics of file types are explained here. if it doesn't, I'm not really sure what it might be, sorry.
 

MechaStarfish

Villager
Member
Joined
Feb 4, 2015
Messages
8
Reaction score
0
First Language
English
Primarily Uses
does it look like this?

if it does, change the file name of your bookcase so it has a $ in front, like "$filename". that changes how the program reads the file, so it treats it like a character sprite instead. the basics of file types are explained here. if it doesn't, I'm not really sure what it might be, sorry.
Yes that is what it looks like, although when I do it my file already has the $ sigh in front of it.  I've tried it about three or for times and the white box still stays where it's at.
 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,049
Members
137,570
Latest member
fgfhdfg
Top