The RPG Maker Resource Kit

RMRK RPG Maker Creation => XP => XP Scripts Database => Topic started by: Heretic86 on April 22, 2016, 06:56:04 AM

Title: Heretic's Moving Platforms
Post by: Heretic86 on April 22, 2016, 06:56:04 AM
Heretic's Moving Platforms XP
Authors: Heretic
Version: 1.0
Type: Movement Add-on
Key Term: Movement Add-on

Introduction
This script allows you to easily create Platforms that your Player and even other NPCs can hop on and be transported around with!

Features


** Additional Scripts required for use of these features

Screenshots

Spoiler for:
(http://downloads.chaos-project.com/heretic86/images/MovingPlatform.jpg)

(http://downloads.chaos-project.com/heretic86/MovingPlatforms/Platform.gif)
(Animated Gif, give it a moment to load...)

Demo

Download Version 1.0 Here (http://downloads.chaos-project.com/heretic86/MovingPlatforms/MovingPlatformsDemo.exe)

Script

Spoiler for:
Code: [Select]
Script is in the Demo

Instructions

REQUIRES:
Heretic's Modular Passable (http://forum.chaos-project.com/index.php/topic,14986.0.html)
Heretic's Collision Optimizer (http://forum.chaos-project.com/index.php/topic,14995.0.html)
Heretic's Restrict Tile Passages (http://forum.chaos-project.com/index.php/topic,14992.0.html) (to move on Impassable Tiles)

Platforms are easy!
To create a Platform, just put in a Comment in the first 10 lines or so that says "\platform[n]" where "n" is a Number!

Next, give it a Comment of "\tile_allow_move[n, n]" where "n" is a Simple Tile ID!  (See Restrict Tile Passages for more info)

Next, give it a Comment of "\allow_npc" if you want NPC Events to move on your Platform.  (Feature requires NPCs on Event Tiles (http://forum.chaos-project.com/index.php/topic,14990.0.html))

Next, give your Platform a Map Tile as a Graphic, set the Move Frequency to Highest, then give it a Move Route that has a WAIT command at locations you expect characters to get on and off.

Thats it!

If you wish to control a bunch of Platforms, use a Platform Master!  Just change one Event from "\platform[n]" to "\platform_master[n]" and that Platform Master will control ALL other Platforms where "n" is the same Number!  You don't even have to give the other Platforms Move Routes, Speed, Move Frequency, just set the Graphics!  This is a Platform Group!

NOTE:  You can only use one Platform Master per Platform Group

You can sync two or more Platform Groups by giving your Platforms or Platform Masters a "\platform_sync[n, n]" Comment where "n" is the Platform Group ID of the other Platform Groups you wish to sync with!  This means when a Platform waits for characters to get on and off, other Sync Groups will also wait for characters.  This is better displayed in the Demo.

Compatibility
Fully compatible with all other scripts that require Modular Passable, including Looping Maps.

This DOES work with Jumping and 8D Movement Systems.

This DOES work with Heretic's Caterpillar 2.0+

This most likely will not work with Pixel Movement scripts.

This does work with both ForeverZer0's and Blizzards Pathfinder scripts, however, you will not be able to pathfind on a Platform.

Not compatible with thin crust pizza when toppings include baloney and peanut butter.  What a disgusting combination.  Squid and Kiwi Fruit Pizzas are untested.

Credits and Thanks


Author's Notes

LEGAL

Pre release versions of this script included very strong legal restrictions preventing distribution of games with those versions due to known game crashing bugs.  Those bugs have since been corrected and the Legal has been altered to allow distribution of games, both free and commercial.  Trust me, if you are using an older version, your players will find those game crashing bugs and you'll only end up making yourself look bad.  I worked very hard to make sure this version does not have any game crashing bugs, but you may still experience some while building your game.

WAITING

If your Platform is not given a Wait command, then characters will not be able to get on or off of Platforms or Platform Groups by stepping or jumping on or off.  Platforms must have a Wait command for boarding and unboarding to commence.

DEBUG:

Additional stuff was written into the code to allow you to hold down the CTRL Key and get on or off of ANY valid Platforms.  This was done because once you are on a Platform, youre pretty well stuck there until the Platform uses a Wait command as part of its Move Route.  While in DEBUG mode, creators need to be able to hop on and off Platforms at any time.
Title: Re: Heretic's Moving Platforms
Post by: yuyu! on April 27, 2016, 03:23:27 AM
Whoa. This is pretty cool! O.O I don't use XP, but I think this will be helpful to anyone who does. :)