Announcement
Announcement
| 2nd Quarter Contest Announcement posted! See the Community Announcements section. |
New threads (complete scripts) here will go into a moderation queue. You will not see your thread appear when you create it. A moderator will decide if it will be approved or denied.
![]() ![]() |
Dec 29 2009, 05:06 AM
Post
#1
|
|
![]() Scripter ![]() Type: Coder Alignment: True Neutral |
Map Edge Transfers v 1.2b by Mithran Introduction Setting up transfer events is an important part of creating your world. Using mapping techniques to funnel the edge of an area into one or two transfer events is one way. However, this can be a bit more time consuming if you are going for an open edge feel. This script gives a simple setup to turn the entire edge of the map into a transfer event. Features - specify a map id, coordiantes, and direction to transfer to for each edge of the map - ability to specificy all edges at once (ie, as if 'leaving town', all edges transfer to the same coordinates) - ability to link an event to the mapedge (to perform tests, eg., 'cannot leave town', or play a sound effect) - now support coordinate offsets and multiple transfer tests per edge, for maps that are not exactly the same size - works well with OriginalWij's Map Slide How to Use Install on its own script page in the materials section of the script editor above main and below default scripts. Goes below OriginalWij's Map Slide, if used. Script Spoiler: Demo Purple Olrac put together a short demo for this script: http://www.l-o-l-s.eu/Demo%20Mapedge.rar FAQ Q: How do you use an event to cancel a transfer? A: Use a force move route on the player to move back one square. If the player moves, the transfer will be cancelled. Q: The player is walking along the map edge and not transferring. A: You must approach the map edge to initiate a transfer, even if using the LAST_TILE_TRANSFER option. Walking parallel to the map edge will not initiate the transfer. Q: One of my map edges wont transfer / part of the edge wont transfer using auto setup. A: There are now advanced options available for setting an offset cooridnate for the new map using an auto setup. Try adjusting the range of your transfer, or your offset. Credit and Thanks - Mithran - additional feature requests by ShadowXzygon, rugear1277 Author's Notes Feedback is welcome. Please do not redistribute without asking. -------------------- My scripts:
Spoiler: Searching for one of my snippets? Mithran's Snippet Repository My current scripting projects: Mithran's Script Development Thread Who says I'm always idle in the IRC? Spoiler: |
|
|
|
Dec 29 2009, 05:28 AM
Post
#2
|
|
![]() The Interloper ![]() Type: Writer Alignment: Chaotic Evil |
This script works great. Except for one thing.
My maps aren't all the same size. So when I did the map transfer thing using this script, it went to an impassible tile. The only thing I specified was the map ID of the teleport. So what I'm asking is that could you make the script transfer the player to the next and closest passable tile? (Yeah, I know you can change transfer coordinates. But it'd be harder if there was multiple entrances to a map on one side.) This post has been edited by ShadowXzygon: Dec 29 2009, 05:47 AM -------------------- ![]() QUOTE "You die a lot. That's not healthy." QUOTE Real life contains glitches, what the %&$@? |
|
|
|
Dec 29 2009, 06:43 AM
Post
#3
|
|
![]() Scripter ![]() Type: Coder Alignment: True Neutral |
Updated to include an option to test the edge of the adjacent map given impassability of the desired autosetup tile. The option is in the setup section. It will test this number of tiles, one at a time, first down then up (for east/west transfers) or first right then left (for north/south transfers) until a passable tile is found to drop the player on. If one is not found, no transfer is performed. This is for autosetup only. Thanks for the suggestion, ShadowXzygon.
-------------------- My scripts:
Spoiler: Searching for one of my snippets? Mithran's Snippet Repository My current scripting projects: Mithran's Script Development Thread Who says I'm always idle in the IRC? Spoiler: |
|
|
|
Dec 29 2009, 07:07 AM
Post
#4
|
|
![]() The Interloper ![]() Type: Writer Alignment: Chaotic Evil |
no problem, glad to help out. (Especially since I'll be using this script
-------------------- ![]() QUOTE "You die a lot. That's not healthy." QUOTE Real life contains glitches, what the %&$@? |
|
|
|
Dec 29 2009, 01:38 PM
Post
#5
|
|
![]() ![]() Type: Undisclosed |
I can't help but to feel this was made to go along with Map Sliding. Good job, Mithran!
-------------------- ![]() |
|
|
|
Dec 29 2009, 11:53 PM
Post
#6
|
|
![]() The Interloper ![]() Type: Writer Alignment: Chaotic Evil |
I have another suggestion. Can it check for events as well? And if the event is Same As Characters, it'll just do the same thing as if it was an impassible tile?
-------------------- ![]() QUOTE "You die a lot. That's not healthy." QUOTE Real life contains glitches, what the %&$@? |
|
|
|
Dec 30 2009, 12:02 AM
Post
#7
|
|
![]() Scripter ![]() Type: Coder Alignment: True Neutral |
I can't help but to feel this was made to go along with Map Sliding. Good job, Mithran! Thanks, and yes, I did have that in mind. I made sure that they work together. I have another suggestion. Can it check for events as well? And if the event is Same As Characters, it'll just do the same thing as if it was an impassible tile? It should already do that with the last update. I tested it in my project and thats how it works (if the event is impassable, it is counted as an impassable tile). -------------------- My scripts:
Spoiler: Searching for one of my snippets? Mithran's Snippet Repository My current scripting projects: Mithran's Script Development Thread Who says I'm always idle in the IRC? Spoiler: |
|
|
|
Dec 30 2009, 12:51 AM
Post
#8
|
|
![]() The Interloper ![]() Type: Writer Alignment: Chaotic Evil |
Oh, okay then. Just wanted to make sure, cuz I tried it with an event that had "Same as Character", no graphic, and it transferred the player onto the event.
Probably just a mistake on my side. -------------------- ![]() QUOTE "You die a lot. That's not healthy." QUOTE Real life contains glitches, what the %&$@? |
|
|
|
Jan 22 2010, 04:00 AM
Post
#9
|
|
![]() Bark bark! ![]() Type: Writer Alignment: Chaotic Good |
If a particular transfer event needs other things to be done before or after the player is actually transferred (map name pop-ups, day/night settings, etc.), can those things be set up normally? Also, can standard transfer event commands be used when appropriate?
-------------------- Pine Banned me because I'm an idiot and cursed and yelled at him
Support bars: Spoiler: Spoiler: Don't be like me, learn to program the right way! |
|
|
|
Jan 22 2010, 05:22 AM
Post
#10
|
|
![]() Type: Undisclosed |
hmm... i like it, but i kinda don't get it... =\
what would i put in each event command for each maps like this? OOOOOOOOO OOOOOOOOO OOOOOOOOO OOOOOOOOOVVVV OOOOOOOOOVVVV >>>>>QQQQVVVV >>>>>QQQQVVVV >>>>>QQQQ something like that... assuming that there are four maps, each letter/sysmbol represent 5 tiles Map 1 (O) = 45 x 25 Map 2 (>) = 25 x 15 Map 3 (Q) = 20 x 15 Map 4 (V) = 20 x 20 so, what do i put into the auto-run event (plus erase) for each map? |
|
|
|
Jan 22 2010, 06:33 AM
Post
#11
|
|
![]() Scripter ![]() Type: Coder Alignment: True Neutral |
@munkis - Yes, you can do just about anything you need to in the mapedge event and the transfer will still go through, just as long as the player is not moved, transferred (in the event), or the scene is changed in that specific event. Putting an map event in a tile along the map's edge also make that event run first, ignoring the map edge transfer for that step if it activates.
@RuGeaR1277 - I haven't added offsets yet, and currently its one map transfer per direction. I'll see if I can do this in a way where the setup is not prohibitably complicated. -------------------- My scripts:
Spoiler: Searching for one of my snippets? Mithran's Snippet Repository My current scripting projects: Mithran's Script Development Thread Who says I'm always idle in the IRC? Spoiler: |
|
|
|
Jan 22 2010, 07:08 AM
Post
#12
|
|
![]() Evil Regular ![]() Type: Undisclosed Alignment: Chaotic Neutral |
Hmm...Couldn't you just make a parallel process that checks your coordinates and warps if you're in certain X or certain Y position? I'm just guessing though, I mean it could even store your coords to see where you warp in the next map.
|
|
|
|
Jan 22 2010, 07:56 AM
Post
#13
|
|
![]() Type: Undisclosed |
@RuGeaR1277 - I haven't added offsets yet, and currently its one map transfer per direction. I'll see if I can do this in a way where the setup is not prohibitably complicated. okay.. thanks, mithran! most of my maps are like that.. Hmm...Couldn't you just make a parallel process that checks your coordinates and warps if you're in certain X or certain Y position? I'm just guessing though, I mean it could even store your coords to see where you warp in the next map. sounds good, but with long parallel processes, won't it lag much? =\ just wondering... -rain46 |
|
|
|
Jan 22 2010, 09:18 AM
Post
#14
|
|
![]() Scripter ![]() Type: Coder Alignment: True Neutral |
@nigromante - Yep, you can do that with a parallel process. Most of this can be evented, in fact. You cannot, however, check the passability of a tile (especially a tile on the next map) through pure eventing, and values such as the map's width and height would need to be set manually for each map or retrieved throught a script command. This system also gives a clear precedence to map events, allowing them to exeucte if they are present instead of transferring. The main point, though, is that this is easy to set up.
-------------------- My scripts:
Spoiler: Searching for one of my snippets? Mithran's Snippet Repository My current scripting projects: Mithran's Script Development Thread Who says I'm always idle in the IRC? Spoiler: |
|
|
|
Jan 26 2010, 06:28 AM
Post
#15
|
|
![]() Scripter ![]() Type: Coder Alignment: True Neutral |
Update v 1.2b
Previous Changes: Spoiler: -------------------- My scripts:
Spoiler: Searching for one of my snippets? Mithran's Snippet Repository My current scripting projects: Mithran's Script Development Thread Who says I'm always idle in the IRC? Spoiler: |
|
|
|
Jan 26 2010, 09:36 AM
Post
#16
|
|
![]() Type: Undisclosed |
copy and paste what i'm gonna ask...
hmm... i like it, but i kinda don't get it... =\ what would i put in each event command for each maps like this? OOOOOOOOO OOOOOOOOO OOOOOOOOO OOOOOOOOOVVVV OOOOOOOOOVVVV >>>>>QQQQVVVV >>>>>QQQQVVVV >>>>>QQQQ something like that... assuming that there are four maps, each letter/sysmbol represent 5 tiles Map 1 (O) = 45 x 25 Map 2 (>) = 25 x 15 Map 3 (Q) = 20 x 15 Map 4 (V) = 20 x 20 so, what do i put into the auto-run event (plus erase) for each map? additional note: i LOVE it, but i still dont get it... =\ maybe answering this example, i can figure it out better... =D thanks in advanced! -rain46 |
|
|
|
Jan 26 2010, 11:13 AM
Post
#17
|
|
![]() Scripter ![]() Type: Coder Alignment: True Neutral |
EDIT:
Spoiler: If you are confused about coordinates, its the same coordinates displayed at the bottom of the editor when you mouse over a certain tile. They start at 0, 0 (x, y) for the uppermost left-hand corner tile, and count up 1 for x every tile to the right, and 1 for right every tile down from there. For example, a map of size 20 x 20 would have a lower-right coordinate of 19, 19. You should get into this frame of mind. For map 1: CODE mapedge_e(4, -1, -1, -1, -15, 15..24) mapedge_s(2, -1, -1, -1, 0, 0..24) mapedge_s(3, -1, -1, -1, -25, 25..44) West and north edges have no adjoining maps, so nothing is set up here. Following the parenthesis, we put the map id to transfer to. Since everything is autosetup, we use -1 for x, y, and direction, hence the three -1s in each section. East edge is connected to map 4 at y coordiantes 15 through 24, so the range we put is 24. We want the coordinate transfer in the next map to be 15 lower than what we transferred from, so the offset is -15. The first part of the south edge is connected to map 2. The tile range for the x coordinates here would be 0..24, so that is our range. Offset here is zero because the x coordiante of the tile you transfer to on the next map cooresponds exactly with this one. The second part of the south edge is connected to map 3. The tile range for the x coordinates here would be 25..44, so that is our range. Offset here is -25 because we want the x coordiante of the tile you transfer to on the next map will be 25 lower than the one on the map you are leaving (eg., if you are leaving at x coordiante 25, you'd transfer into the upper left hand corner of map 3 as expected) For the rest of the maps, the following should work: Map 2: CODE mapedge_n(1) mapedge_e(3) Since the adjacent maps are lined up at the left and top, respectively, no ranges or offsets are needed. Map 3: CODE mapedge_w(2) mapedge_n(3, -1, -1, -1, 25) mapedge_e(4, -1, -1, -1, 10, 0..9) Again, no extra setup needed to go from 3 to 2 because their heights are they same, and they line up at the top. The north edge must be offset 25 to land on the correct tile (eg., transferring from x coordiante 5 on map 3 would land you at x coordinate 30 in map 1), but we need no range because the entire edge has the same destination. For the east edge, we are transferring to map 4, coordinate offset will be 10, because we want to be 10 tiles further south on map 4 after we transfer. Map 4: CODE mapedge_w(1, -1, -1, -1, 15, 0..9) mapedge_w(3, -1, -1, -1, -10, 10..19) You should be getting the hang of it by now. For the west edge, transfer to map 1 is done at y coordiantes 0..9, and will be offset by 15. Also for west edge, transfer to map 3 is done at y coordiantes 10 through 19, and will be offset by -10. I'm thinking of adding a secondary command specifically for autosetups (what 99% of this script is likely to be used for) so that you dont have to type the three -1s every time. Edit: See above. -------------------- My scripts:
Spoiler: Searching for one of my snippets? Mithran's Snippet Repository My current scripting projects: Mithran's Script Development Thread Who says I'm always idle in the IRC? Spoiler: |
|
|
|
Jan 26 2010, 11:34 PM
Post
#18
|
|
![]() Type: Undisclosed |
i think i kinda get it... =D
thanks a lot, Mithran! |
|
|
|
Feb 15 2010, 03:55 AM
Post
#19
|
|
![]() Darkness surround us...the best thing to do, let it absorb you.. ![]() Type: Designer |
Hi Mithran, (I hope I'm not necroposting, if I am, sorry! My bad)
I have a small doubt about this script of yours. Is it possible to disable the "mirror" effect (if you are going left, you will be placed on the rightmost edge of the next map) so instead the player, if going left, appears on the rightmost left side. I hope I made myself clear and hope you can help me, thanks in advance. |
|
|
|
Feb 15 2010, 04:02 AM
Post
#20
|
|
![]() Scripter ![]() Type: Coder Alignment: True Neutral |
Hi Mithran, (I hope I'm not necroposting, if I am, sorry! My bad) I have a small doubt about this script of yours. Is it possible to disable the "mirror" effect (if you are going left, you will be placed on the rightmost edge of the next map) so instead the player, if going left, appears on the rightmost left side. I hope I made myself clear and hope you can help me, thanks in advance. I'm not sure what you mean. You want the player to transfer to the exact coordinates on the map he is transferring to as the map he is trasnferring from? -------------------- My scripts:
Spoiler: Searching for one of my snippets? Mithran's Snippet Repository My current scripting projects: Mithran's Script Development Thread Who says I'm always idle in the IRC? Spoiler: |
|
|
|
![]() ![]() |
| Lo-Fi Version | Time is now: 24th May 2013 - 08:46 AM |
|
|