FALLING OBJECT FROM CEILING OR SKY (REVISED)

You can have an item, chest, etc. fall from the ceiling or from the sky.

  • dnel57
  • 03/13/2021 04:27 PM
  • 1808 views
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
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.


Table is done.

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:Switch: Table in place 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 and opened, just use your action button on it.


Chest P4

Conditions:Self switch A is 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:

Ignore the page number on this event.It will be Page 2 in your event.


Chest P3 would then look like this:
This can be copied from a Quick Event Creation:Chest


Chest P4 will remain the same.

Variables

Now, on the ceiling tiles , there are 2 Events The one on the Left is for Variables

The one on the right is for Conditional Branches which will be to determine what happens when the Table and Tile Locations are the same.

Variables
Open an Event name it Variables
Variables P1
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.

Where it says Game Data Map ID, use the three dots to drop down and select Character 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 each entry 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.

The page will look like this:


On the very next line@ Repeat the same process only this time,
Table y is Equal to Tile y
Once again, Make sure "Set handling when conditions are not met" is NOT Checked
This is saying that Table y and Tile y will be occupying the same tile.
Click OK and Apply
Now, the Event is saying that 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.

On the next line@ Control Switches Table in place is ON.
The finished page will look like this:



Once everything works as it should, you will need to make a copy of the room as it will appear when it is solved.

It should look like this:


This represents the room after the chest event is complete.
Go back to your Chest Event.Page 3.
Just above the command to set Self Switch A to ON, insert a Control Switch event. Call the switch Chest Event Complete set it to ON



Now on the duplicate map, do a Transfer Player Event the same as the original room because you will still be exiting to the same area.
All that is left now is the door that you enter the puzzle room from.

It should look something lie this:



Make a Page two and copy and paste the door event commands.
Make the Condition Switch Chest Event Completed is ON and it should look like this:



Now, once the puzzle has been solved, and you re-enter the room, the puzzle will not repeat because you will now be entering the duplicate room every time.







That is it. Place your character and push the Table into place.
Comments always welcome.
Any problem or need help, leave message on the page and I'll get back asap. I check at least once a day.
Thanks

















]