Chaos Project

RPG Maker => RPG Maker Scripts => RMXP Script Database => Topic started by: nathmatt on September 13, 2010, 07:58:45 pm

Title: [XP] Event Map Linker
Post by: nathmatt on September 13, 2010, 07:58:45 pm
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




Screenshots

no screenshot needed


Demo

Demo (http://www.sendspace.com/file/3oa662)


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




Author's Notes

if you have any issues or suggestions post here
Title: Re: [XP] Event Map Linker
Post by: Ryex on September 13, 2010, 08:41:02 pm
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.
Title: Re: [XP] Event Map Linker
Post by: Jragyn on September 13, 2010, 08:43:15 pm
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
Title: Re: [XP] Event Map Linker
Post by: Ryex on September 13, 2010, 08:49:38 pm
simaler, but only creates transfers instead of joining the maps
Title: Re: [XP] Event Map Linker
Post by: 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
Title: Re: [XP] Event Map Linker
Post by: ojp2010 on September 13, 2010, 09:19:07 pm
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?
Title: Re: [XP] Event Map Linker
Post by: Jragyn on September 13, 2010, 11:18:09 pm
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
Title: Re: [XP] Event Map Linker
Post by: 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
Title: Re: [XP] Event Map Linker
Post by: Taiine on September 14, 2010, 04:32:45 am
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.
Title: Re: [XP] Event Map Linker
Post by: nathmatt on September 14, 2010, 08:26:56 am
update fixed a bug where you would transfer back and force between maps and get a script is hanging error.
added demo
Title: Re: [XP] Event Map Linker
Post by: ojp2010 on September 14, 2010, 09:48:51 am
Quote from: Blizzard on September 14, 2010, 02:25:24 am

You think I should release that script? :V


Yes, I think you should ;)
Title: Re: [XP] Event Map Linker
Post by: Ryex on September 14, 2010, 12:46:59 pm
Quote from: ojp2010 on September 14, 2010, 09:48:51 am
Quote from: Blizzard on September 14, 2010, 02:25:24 am

You think I should release that script? :V


Yes, I think you should ;)


I don't
Title: Re: [XP] Event Map Linker
Post by: element on September 14, 2010, 02:24:51 pm
Quote from: Ryexander on September 14, 2010, 12:46:59 pm
Quote from: ojp2010 on September 14, 2010, 09:48:51 am
Quote from: Blizzard on September 14, 2010, 02:25:24 am

You think I should release that script? :V


Yes, I think you should ;)


I don't


I second that
Title: Re: [XP] Event Map Linker
Post by: Ryex on September 14, 2010, 02:54:13 pm
^^ you second the i don't correct?
Title: Re: [XP] Event Map Linker
Post by: Zeriab on September 14, 2010, 04:02:01 pm
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 >_>
Title: Re: [XP] Event Map Linker
Post by: 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:
Title: Re: [XP] Event Map Linker
Post by: element on September 15, 2010, 07:50:40 am
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.
Title: Re: [XP] Event Map Linker
Post by: ojp2010 on September 15, 2010, 01:59:26 pm
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.
Title: Re: [XP] Event Map Linker
Post by: 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.
Title: Re: [XP] Event Map Linker
Post by: ojp2010 on September 15, 2010, 03:37:41 pm
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.
Title: Re: [XP] Event Map Linker
Post by: nathmatt on September 15, 2010, 05:22:59 pm
try it now ABSEAL might have been killing it
Title: Re: [XP] Event Map Linker
Post by: ojp2010 on September 15, 2010, 08:28:48 pm
Well maybe I am setting it up wrong cause I still can't seem to get it to work. Here is what I am doing;


Event setup
Spoiler: ShowHide
 \link[2,3,0,0] 


Maps that are being linked
Spoiler: ShowHide
(http://img409.imageshack.us/img409/5863/56779339.png)


The event is place in bottom left hand corner of the map at 29/2 (y/x) of a 30X30 map

Script is placed above all of blizzards script in the everyone else script here selection
Title: Re: [XP] Event Map Linker
Post by: nathmatt on September 15, 2010, 08:40:23 pm
the 2 is ur problem it need to know the direction the player need to face 2 down 4 left 6 right 8 up it should be 6
Title: Re: [XP] Event Map Linker
Post by: ojp2010 on September 15, 2010, 08:52:15 pm
Quote from: nathmatt on September 15, 2010, 08:40:23 pm
the 2 is ur problem it need to know the direction the player need to face 2 down 4 left 6 right 8 down it should be 6


Player is going south, so that would be down which is 8 correct?

Well I tried changing it to 6, 4 and 8 to no anvil I didn't get it to work still. I don't know what I am doing wrong.
Title: Re: [XP] Event Map Linker
Post by: nathmatt on September 16, 2010, 10:04:39 am
Post up a demo and I will look at it btw south is 2 north is 8 which is what you had so post the demo