[XP] Event Map Linker

Started by nathmatt, September 13, 2010, 07:58:45 pm

Previous topic - Next topic

nathmatt

September 13, 2010, 07:58:45 pm Last Edit: September 15, 2010, 05:19:12 pm by nathmatt
Event Map Linker
Authors: Nathmatt
Version: 1.02
Type: Map Linker
Key Term: Misc Add-on



Introduction

It allows you to use events to link the entire edge of the map


Features


  • easy event name config



Screenshots

no screenshot needed


Demo

Demo


Script

Spoiler: ShowHide
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Event Map Linker by Nathmatt
# Version: 1.02
# Type: Map Linker
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#   
#  This work is protected by the following license:
# #----------------------------------------------------------------------------
# # 
# #  Creative Commons - Attribution-NonCommercial-ShareAlike 3.0 Unported
# #  ( http://creativecommons.org/licenses/by-nc-sa/3.0/ )
# # 
# #  You are free:
# # 
# #  to Share - to copy, distribute and transmit the work
# #  to Remix - to adapt the work
# # 
# #  Under the following conditions:
# # 
# #  Attribution. You must attribute the work in the manner specified by the
# #  author or licensor (but not in any way that suggests that they endorse you
# #  or your use of the work).
# # 
# #  Noncommercial. You may not use this work for commercial purposes.
# # 
# #  Share alike. If you alter, transform, or build upon this work, you may
# #  distribute the resulting work only under the same or similar license to
# #  this one.
# # 
# #  - For any reuse or distribution, you must make clear to others the license
# #    terms of this work. The best way to do this is with a link to this web
# #    page.
# # 
# #  - Any of the above conditions can be waived if you get permission from the
# #    copyright holder.
# # 
# #  - Nothing in this license impairs or restricts the author's moral rights.
# # 
# #----------------------------------------------------------------------------
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
class Game_Map
 
  attr_reader   :map_linked
 
  alias map_link_setup setup
  def setup(map_id)
    map_link_setup(map_id)
    @map_linked = {}
    @map.events.each_pair{|i,event| map_link_name_check(i,event)}
  end
 
  def map_link_name_check(i,event)
    if event.name.clone.gsub!(/\\[Ll]ink\[([\d, ]+)\]/) {"#[$1]"}
      @map_linked[i] = eval("[#{$1}]")
    end
  end
   
end

class Game_Event
 
  alias map_link_update update
  def update
    map_link_update
    if $game_map.map_linked[@id] != nil
      map = $game_map.map_linked[@id]
      case map[0]
      when 4,6
        if $game_player.x == @x
          if map[0] == 4
            return if $game_player.direction != 4
          elsif map[0] == 6
            return if $game_player.direction != 6
          end
          transfer(map[1],map[2],$game_player.y)       
        end
      when 2,8
        if $game_player.y == @y
          if map[0] == 2
            return if $game_player.direction != 2
          elsif map[0] == 8
            return if $game_player.direction != 8
          end
          transfer(map[1],$game_player.x,map[3])
        end
      end
    end
  end
 
  def transfer(m,x,y)
    $game_temp.player_transferring = true
    $game_temp.player_new_map_id = m
    $game_temp.player_new_x = x
    $game_temp.player_new_y = y
  end
 
  if $BlizzABS
   
    alias map_link_update? update?
    def update?
      map_link_update?
      return true if $game_map.map_linked[@id]
    end
   
  end
   
end



Instructions
in the demo



Compatibility
no compatibility issues known


Credits and Thanks


  • Nathmatt
  • ojp2010 for requesting it sorta



Author's Notes

if you have any issues or suggestions post here
Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


Ryex

lol, it's a less advanced version of the script Blizz made for remexos!.
suggestion to fix compatibility
have it work off of comments in the event. loop through the events commands in an event and if the command code is a comment check it. STOP checking as soon as you find an non comment command code. that way it will be compatible with everything.
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

Jragyn

I don't even feel like I fully understand what this script does, really.

Is this similer to the map thing Blizzard created, that flows maps together?
:???:


--J
A bright light can either illuminate or blind, but how will you know which until you open your eyes?

Ryex

simaler, but only creates transfers instead of joining the maps
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

nathmatt

Actually it might be compatible I forgot I did it defferently so it should work i will fix that in the compatibility tomarrow when I get on my pc
Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


ojp2010

September 13, 2010, 09:19:07 pm #5 Last Edit: September 13, 2010, 09:34:50 pm by ojp2010
Quote from: nathmatt on September 13, 2010, 09:13:31 pm
Actually it might be compatible I forgot I did it defferently so it should work i will fix that in the compatibility tomarrow when I get on my pc


I think I am in love? <3 Thank you nathmatt I will begin testing.

Edit: Played with it just a little bit, but I think I am setting it up wrong.

Event Name: [1,3,5,1]  To transfer to map 3 from the bottom, to X-5, Y-1

Event Command Transfer player map003: down, no fade, 001,001

But the the player only transfered on the square with the event in it. Did I set it up wrong?

Jragyn

It creates transfers?
Can you give me an example of why then you'd use this script to teleport a player from one map to another, instead of just directly creating the transfer events?


--J
A bright light can either illuminate or blind, but how will you know which until you open your eyes?

Blizzard

Quote from: Ryexander on September 13, 2010, 08:41:02 pm
lol, it's a less advanced version of the script Blizz made for remexos!.


You think I should release that script? :V
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Taiine

Little confused as well how this works.. think a demo may be nice to get a better idea as to how these events are set up.

nathmatt

update fixed a bug where you would transfer back and force between maps and get a script is hanging error.
added demo
Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


ojp2010


Ryex

I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

element


Ryex

^^ you second the i don't correct?
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

Zeriab

September 14, 2010, 04:02:01 pm #14 Last Edit: September 14, 2010, 04:03:29 pm by Zeriab
Quote from: Blizzard on September 14, 2010, 02:25:24 am
Quote from: Ryexander on September 13, 2010, 08:41:02 pm
lol, it's a less advanced version of the script Blizz made for remexos!.


You think I should release that script? :V


Stop being lazy and release your shit.antonym
Release it again if you already have released it >_>

Blizzard

It's not about laziness. It's a script I created specifically for Remexos and I wouldn't want people to be able to just make a clone game that easily. D:
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

element

Quote from: Ryexander on September 14, 2010, 02:54:13 pm
^^ you second the i don't correct?

I seconded your I don't  :D
so yes, correct.

ojp2010

Quote from: Blizzard on September 14, 2010, 04:09:59 pm
It's not about laziness. It's a script I created specifically for Remexos and I wouldn't want people to be able to just make a clone game that easily. D:


Oh no, I agree with you I just been looking for a script the functions like maplinks that will work with RMX-OS. My reasoning is mmorpg, or just online games in general that are "worlds" should have a open feel and such a script that works with RMX-OS will improve the use of the script in all together for everyone bother the creators and the player. But I wouldn't want to be the one to "clone" the anothers game.

Blizzard

I know. Hence why I made that script for Remexos.
Also, I am getting the idea that you are misunderstanding what the script does. It does not connect maps visually like my Continuous Maps script, it only links maps together automatically so you don't have to put on a bunch of teleporting events at the map borders.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

ojp2010

Quote from: Blizzard on September 15, 2010, 03:18:12 pm
I know. Hence why I made that script for Remexos.
Also, I am getting the idea that you are misunderstanding what the script does. It does not connect maps visually like my Continuous Maps script, it only links maps together automatically so you don't have to put on a bunch of teleporting events at the map borders.


I know what you mean, I am looking for a a script that works with RMX-OS and BABS like the original map-links script made by Wachunga. I would think making continuous maps script for RMX-OS would be very challenging, but that isn't what I am asking for.   


BTW, nathmatt BABS is still killing the maplink or at least I think that is what is making it not working.