Syndicate content

how can i enable an airship to land, transform and go under the water

9 posts / 0 new
Last post
Offline
Townie
Joined: 5 Sep 2010
how can i enable an airship to land, transform and go under the water
i mean like in final fantasy 5. i also need help with getting the ship to go into space because i want the characters to get spells from the sea and space. how can i create that.
meustrus's picture
Offline
RoyalÜber TownieUltra TownieMega TownieSuper TownieGreat TownieTownie
Joined: 18 Jan 2006

Which program are you using? There might be a way to use an event or common event to listen for landing the airship, check what tile you're over (probably with Call Script), and change the airship into a ship (again with Call Script). There might also be a way to similarly allow the ship to turn back into an airship, or with some extra interface using pictures also go underwater (which I would imagine is just a sprite change + teleport event).

Offline
Ultra TownieMega TownieSuper TownieGreat TownieTownie
Joined: 26 Apr 2009

Strictly speaking... apply this action anywhere? or during certain locations?

If it´s under certain locations you could place an event that when triggered (by either using the action key or simply walking to it) checks to see if you are currently boarded in some airship/sub, etc...  and prompts you to see if you want to submerge/go to space,

to do the latter you´d simply do a brief map switch into an underwater/deep space variated map, using a different or more flashy animation to give players the feeling they´re actually heading there.

if you wanted to do this ANYWHERE, I´d suggest a script.


The project still lives!

SPAMHUNTER SCORE: A+
KILLS: 22 DEATHS: 0 CRITICALS: 2 = TOTAL KILLS: 23

egg_dragon's picture
Offline
Ultra TownieMega TownieSuper TownieGreat TownieTownie
Joined: 23 Oct 2005

I shouldn't even respond seeing how old this post is, but since there doesn't appear to be much activity in the game making section of the forums that leaves little fresh posts to respond to Sticking Out Tongue

I created a tutorial with an accompanying demo of an event-based airship system for RPG Maker XP.  It's extremely flexible and allows for the ability to enter your ship a la FFII while it's grounded or in-flight.  I could easily add a feature to allow it to convert to a sea-going vessel, submarine or space ship; that would really only be a matter of transferring the player to a different map, as meu and RAV said above.

In fact, even though the chances of the original poster actually seeing our replies is highly unlikely, I think I'm going to add some extra features to my old airship system to include changing from submarine to sea-going vessel to airship to spaceship.  It will function very much like the ship in Lufia 2, with the exception of also going into space.

EDIT: Currently working on a small demo for this using RPG2k3.  It's not exactly a break through by any means but in the future it may help others like the original poster.  Right now you can take off in the airship and land it on flat ground, forests or in the water.  When you land it in water it turns into a sea going vessel which can only traverse water tiles.  Next up is to turn it back into an airship from the water, or submerge beneath the ocean's surface.  I would add in the space ship transformation as well, but I don't have any spacecraft-looking character sets :\  Oh, and I'm going to make it so you can view the ships while you're on board and walk around and do stuff, so each transformation will have a different map for that, too.

EDIT: All three transformations are complete: airship, sea ship, and submarine.  You can land the airship on land or in water where it turns into the sea ship, and from that you can submerge below the ocean and cruise around in a submarine or return to the skies in the airship.  The last thing to set up is the inside of each vessel so you can walk around on deck or in the cabins, etc.

Offline
Townie
Joined: 5 Sep 2010
do you have a link for that demo.
egg_dragon's picture
Offline
Ultra TownieMega TownieSuper TownieGreat TownieTownie
Joined: 23 Oct 2005

Yes, sir! You can find it at my little RPG Maker website via this link:

http://sleverich.webs.com/rpgmakertutorials.htm

Offline
Townie
Joined: 5 Sep 2010
i looked at your demo but it is too complex for me to understand it right away.(programming isnt my speciality.) could you explain it to me so that understand how i can create it in my own project.
egg_dragon's picture
Offline
Ultra TownieMega TownieSuper TownieGreat TownieTownie
Joined: 23 Oct 2005

I certainly can.  I hope you don't mind if it takes me a day or two to lay it out for you; between work and my daughter the weekends are about the only free time I have, but I would love to explain it for you, it's actually fairly simple as long as you have a firm grasp on switching, variables, conditional branches and common events.

egg_dragon's picture
Offline
Ultra TownieMega TownieSuper TownieGreat TownieTownie
Joined: 23 Oct 2005

Okay, so as not to overwhelm you with too much information I will begin by simply explaining what basic maps, events and switches you'll need to set up this airship event.  Then I'll do a quick run-through of how the event commands are used on each page of the main event, and if you need a more in-depth explanation I can do that for you when I have a little more time.

First off, if you want your airship to dive below the surface of the water tiles you will need to set up a second "underwater" map that is identical to the world map as far as dimensions and where you place your impassable tiles, however impassable tiles would be the reverse of your world map (ie land tiles underwater would be impassable while water tiles are not).  You can actually make your underwater map look however you want; using variables with the player's stored X and Y coordinates and conditional branches during the transition from one map to another you can determine where to on the new map they should be transferred.

The next thing you need is the airship event.  For testing purposes I just created this event on a random tile on the world map.  For your game you would have to figure out how to access this event (most likely just by turning on a switch to make the event active).

This event would need 5 separate event pages: one for a parked airship on land, one when the airship is flying, one when the airship is sailing on the seas, one when it is anchored offshore and a fifth for when it is surfacing above the water.

The first page (when it's parked on land) is simply triggered by the action key and has a non-animated sprite.  When you stand on the ship and press 'enter', you should have the lead party member's sprite graphic change to the same sprite as the ship (use the move event command to do this), fade out the background music, change the airship sprite to a blank one, initiate your airship music, and--again using the move event command--turn on phasing for the hero sprite.  Finally, turn on a switch called something like "Airship Active".

The second page is turned on with "Airship Active" and is a parallel process event.  This is where the key commands are handled to allow you to land the airship.  Use the key input command and use a variable called "Ship Commands" to check whether the player is trying to land.  Then with a conditional branch, check to see if that variable equals 5 (enter key) if so set variables Player X tile and Player Y tile to the hero's current X & Y coordinates and store the player's tile ID into variable Player Tile ID based on those coordinates.

Then, depending on how you have your terrain ID's set up in the database, you'll check whether or not your airship can land on a given tile using more conditional branches which check the player's current terrain ID.  In the case of my demo, tiles with an ID of 10 or higher are water tiles, tiles with an ID of 6 or less are land tiles, and anything in between are non-landing tiles (like mountains).

If the player can land on a water tile, just fade out the music, use the move event command to "animate" the airship landing and converting into a sea-going vessel, play the sea ship music, change the map tileset to a version of the world map set that allows passage over water but not land tiles, then turn on switch "Sea Ship Active".

With me so far?

If the airship landed on a land tile, do the above events but instead of turning on the "Sea Ship Active" switch, just turn off the "Airship Active" switch.  If the player tries to land on a non-landable tile, display a message like "Can't land here" in the else handler of the conditional branch.

The "Sea Ship Active" event page is much like the "Airship Active" page, except that you must also check if the player is trying to go ashore straight from the water.  If the player wants to return to the air, do the reverse of when they landed in the water but finish that chunk of conditional branch by turning off switch "Sea Ship Active".

If the player wants to go ashore, you need to store their X & Y coordinates against but, depending on the direction they must travel to get on shore, you need to adjust either the X or Y coordinates by + or - 1.  For instance, if the player is facing down and wants to move onto a land tile south of their current position, you would check the ship commands variable to see that it equals 1 (the value of the down arrow key which would be stored in the ship command variable whenever you press it).  If it equals 1, you would then ADD a value of 1 to the Y variable; if you were pressing the up arrow, you would SUBTRACT a value of 1 rather than add and if you were pressing left or right you would add or subtract from the X variable rather than the Y variable.  Make sense so far?

After doing that check, you then have to make sure the tile you want to move onto is passable so now use the updated X & Y variables to find the terrain ID of the intended tile.  If it's passable, restore the X & Y positions back into their respective variables and move this event to that location, fade the bgm, play the map music, change the event sprite to the now-anchored offshore sprite you want to use, and return the player sprite back to normal and move the player event one tile in whichever direction the ship was previously facing.  Lastly, turn on a new switch "Seaship @ Sea" to move on to a new page.

If you want to dive below the surface, it's much like returning to the airship only you must add a teleport event command to transfer the player to the underwater map.

To enter the sea vessel you want to set this fourth event page to "collision with hero" and the event layer as "same layer as hero".  All the player has to do now is approach the ship event (now sitting in the water along the shoreline) and touch it.  Fade the bgm, use the move event command to animate the ship and make the player "disappear", change the tileset back over to the one with passable water tiles, then turn the switch "Seaship @ Sea" off.

Whew!  I hope that wasn't too confusing.  I'm sure there'll need to be some clarification on parts of this, but hopefully that'll give you the basic idea.  You can always open up the demo with your RPG Maker program and view the events yourself.  In fact, you can copy exactly what I have and run with it.  Transitioning from the hero to the airship is a little ugly so you'll want to play with that and make it look a little more polished, though.

Let me know if you need me to clarify any points and good luck!

Topic locked

Who's online

There are currently 0 users and 2 guests online.