Edge Handler

whitesphere

Veteran
Veteran
Joined
Mar 14, 2014
Messages
1,686
Reaction score
784
First Language
English
Edge Handler 0.1.0

whitesphere


 

Introduction

Either calls a user-specified common event when the player reaches any edge of a map, or transports the player to a different map as if the player walked from one to the other.

 

Features

- Can call a common event, with party's Direction and current Map ID set

- Can seamlessly wrap the party onto a different map, even with different map sizes

- Can be disabled per map edge or overall for the current map only

 

How to Use

After inserting the plug-in, set the Direction and Map ID variables and the Common Event setting.  This enables the default setting.

However, for more detailed control, use a note-tag as follows:

<edge: (direction)=handling_type(param) [fade=(0, 1, 2)] [sound=Move1]>

 

Here, direction can be the words "top", "bottom", "left" or "right" to represent the corresponding

edge of the map.

Handling_type is either "common_event" (call a common event), "map" (move to the opposite 

edge on the specified map ID) or "none" (do nothing)

 

For common_event handling, param is the Common Event called, and for map handling, it is the Map ID.

 

If you set "fade," that tells the plug-in how to fade between maps.  0=Fade to Black, 1=Fade to White, 2 = No Fade

 

Finally, the "sound" is a Sound Effect played right before the plug-in calls the Common Event or performs the map transfer.

 

Demo

 

Here is a small demo.  To use this, take the "audio" and "img" directories from your NewData folder and copy them into these directories.

 

EdgeHandlerDemo.zip

 

Script

 

My plug-in is available via Pastebin here:http://pastebin.com/embed_js.php?i=Rxzune2e

 

FAQ

 

Q: How do I know the Map ID?

A: It is in the upper left-hand corner of your map, labelled "Map ID"

 


Usage Terms/size]

 

This plug-in is free for commercial and non-commercial use as long as I'm given credit.

 


 
 

Attachments

MuteDay

Mutation Engine
Veteran
Joined
Oct 19, 2015
Messages
253
Reaction score
39
First Language
English
problem with this is 

@line 502 you need to change arguments to map_id or it bugs the whole game out
 

whitesphere

Veteran
Veteran
Joined
Mar 14, 2014
Messages
1,686
Reaction score
784
First Language
English
I fixed this issue.  The latest version is in my pastebin.  And, yeah, it really bugged out the game I was using it in before the fix.
 

MuteDay

Mutation Engine
Veteran
Joined
Oct 19, 2015
Messages
253
Reaction score
39
First Language
English
any chance you might update so that way if thier is something in the road of where you would move to (ie wall or a tile that wouldnt be moveable) it doesnt allow them to move via that linked square

any other plans for updates?
 

MuteDay

Mutation Engine
Veteran
Joined
Oct 19, 2015
Messages
253
Reaction score
39
First Language
English
sorry to bug you again but another bug i believe

if (direction == 4) {
        map=this.moveToDifferentMap(new_x, new_y, map_id, direction, this.fade, this.sound);
        return;
    }

movetodifferentmap doesn't return anything and map is not defined 
 

whitesphere

Veteran
Veteran
Joined
Mar 14, 2014
Messages
1,686
Reaction score
784
First Language
English
any chance you might update so that way if thier is something in the road of where you would move to (ie wall or a tile that wouldnt be moveable) it doesnt allow them to move via that linked square

any other plans for updates?
I don't think that's possible, because the way it determines the proper tile in the new map is by finding it after loading the new map.  The most it could do is move the party to the nearest passable location, in a straight line, from the position they would enter.  

As for your other question, those aren't bugs.  JavaScript will automatically declare an object, in place.  It doesn't require formal declaration of an object.  This can seem really weird if you're used to more strictly defined OO languages like Java.

Technically, moveToDifferentMap doesn't return anything because it schedules a map transfer then returns.  So, the new object "map" would be set to the special value "undefined"

So, the "map" variable doesn't represent anything useful.   Technically, it's a bug but it would be more of a "variable defined but not used" warning.
 
Last edited by a moderator:

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

Latest Threads

Latest Posts

Latest Profile Posts

I've been debating on this as the title screen for a while now...
Ami
--- Dialog Filter ---

Gunner: Yo! my ****** friend?
Hero: Uhh,what happen with your mouth?
Gunner: Huh? what ****** happen with my mouth? i just speech as usual.
Hero: But,your mouth are like the garbage!
Gunner: Hey,what the **** are you say? you want the piece of **** with my ****** Gun!
(Meanwhile,The Dialog Filter In The Option Is Off)
Demo for Maze of the Lost MZ released. I would appreciate any and all feedback and constructive criticism. If you like Dungeon Crawlers and JRPG's with a hint of Metroidvania and Shadowgate/Uninvited you might like it. https://forums.rpgmakerweb.com/index.php?threads/maze-of-the-lost-mz-demo-port-from-mv.127971/
Well, here it is, colored. :kaoslp:

Forum statistics

Threads
103,389
Messages
998,961
Members
134,907
Latest member
zelda3469
Top