Object Falling from Ceiling or Sky
In this tutorial, I made a chest fall to the floor, bounce and land again popping the chest open.I have made a very simple map to illustrate.
There are many ways to trigger the chest. A switch, a puzzle to solve or very simply, a below character player touch event.
I chose a very simple puzzle of pushing a table into place.
Leave a couple undeveloped rows of tiles above the picture to place the Chest Event or more for more effect.
Place 2 chairs or stools with a space between them for the Table to go.
First, an Event for the Table.
Table P1
Create an Event and name it Table
Priority: Same as Characters
Comments: Play SE Push
Comments: Set Move Route: Move away from Player
Table P2
Conditions: Create a Switch: Table in place
This page will prevent the Push sound if you push on the table after it's been placed.
Next, the Tile between the chairs
Create an Event Name it Tile
Nothing else is needed because it is only to set it's location coordinates.
Now the Chest event
Create an Event 2 tiles above the map.Name it Chest
Chest P1
No graphic. It will appear when Table is pushed into place.
Priority: Above Characters
Options: Check Through
That is all for this page.
Chest P2
Conditions: Creat a Switch: Chest Falls is ON
Trigger: Parallel Process
Priority: Same as characters
Options:Through
Comments:
Move Route: as shown
Control Switch: Create a switch called Chest lands is ON
Chest P3
Conditions: Chest Lands is ON
Priority: Same as characters
Trigger: Action Button
Comments: can be what ever you like.
Control Self Switch A is ON
Once the chest has stopped ond opened, just use your action button on it.
Chest P4
Conditions:Self switch A ON
Priority:Same as characters
Alternative Effect
If you prefer not to have the bounce and the chest open, and would prefer to just have it land, then,delete all move route entries in Chest Page 2 after the first SE :Earth3 entry.
Page 2 would then look like this:
Chest P3 would then look like this:
This can be copied from a Quick Event Creation:Chest
Chest P4 will remain the same.
Now, on the ceiling tiles , there are 2 Events.
The one on the left will be to keep track of the positions for the Table and the Tile
The one on the right will be to determine what happens when the Table and Tile Locations are the same.
Variables
Open an Event name it Variables
Trigger: Parallel Process
Under Comments:
Click on Control Variables. You will come to the small page below.
Where it says Single, click on the three dots and create a new variable Call it Tile X.
Operation: Set
Operand:Click on Game Data.
A new page will open.
On the page below, use the drop down arrow and select Tile
On the page below click both OK buttons and then click apply at the bottom of the Event sheet..
The page below is saying that you are keeping track of Tile's Map x location which is why there is an ('s) between
Tile and Map x
Repeat this process three more times
You will need to create new Variables for each.
Make sure you start eachentry on the very next @ line.
Tile y Tile's Map y
Table x Table 's Map x
Table y Table 's Map y
When finished, the page will look like this.
Now finally. the Conditional Branches
Branches P1
Open an Event. Call it Branches or Conditional Branches.
Trigger: Parallel Process
Branches P2
Click on the Variable directly under Switch
Use the three dots and find Table x
Make sure Equal to is showing.
Under that, Click Variable use the three dots and select Tile X
Make sure "Set handling when conditions are not met" is NOT Checked
This is saying that Table x and Tile x will be occupying the same tile.
Click OK and Apply.
On the very next line@ Repeat the same process only this time, Table y Equal to Tile y
Once again, Make sure "Set handling when conditions are not met" is NOT Checked
Now, the Event is sayingthat Table x and Tile x are occupying the same tile and the Table y and Tile y are occupying the same tile.
So, now that those two things are true, something will happen.
Control SwitchesTable in Place is ON.
The finished page will look like this:
That is it. Place your character and push the Table into place.
Any problem or need help, leave message on the page and I'll get back asap. I check at least once a day.
Thanks
本贴来自国际rpgmaker官方论坛作者:dnel57处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/object-falling-from-ceiling-or-sky.134381/
页:
[1]