[Resolved][XP] Save Event Position

Started by ShadowSaber, April 09, 2011, 09:20:29 am

Previous topic - Next topic

The Niche

And I shall labour night and day to render G_G immortal.
Level me down, I'm trying to become the anti-blizz!
Quote from: winkio on June 15, 2011, 07:30:23 pm
Ah, excellent.  You liked my amusing sideshow, yes?  I'm just a simple fool, my wit entertains the wise, and my wisdom fools the fools.



I'm like the bible, widely hated and beautifully quotable.

Dropbox is this way, not any other way!

ShadowSaber


Blizzard

Lol, I already did.

Quote from: Blizzard on April 10, 2011, 02:11:40 pm
It's this easy.

module MapManager
 
  @maps = {}
  def self.get_map(map_id)
    @maps[map_id] = Game_Map.new if !@maps.has_key?(map_id)
    return @maps[map_id]
  end
 
end

class Game_Map
 
  alias setup_mapmanager_alias setup
  def setup(map_id)
    $game_map = MapManager.get_map(map_id)
    $game_map.setup_mapmanager_alias(map_id)
  end
 
end


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.

ShadowSaber

oh thanks :D, but, can you tell me how to use it?

Blizzard

Just insert is above main and that's that. No need to do anything.
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.

G_G

Holy crap I thought that was like a base leading us in a direction or something. My god blizzard you beast.

The Niche

Blizzard came out of retirement, made one script, got bored and went back.
Level me down, I'm trying to become the anti-blizz!
Quote from: winkio on June 15, 2011, 07:30:23 pm
Ah, excellent.  You liked my amusing sideshow, yes?  I'm just a simple fool, my wit entertains the wise, and my wisdom fools the fools.



I'm like the bible, widely hated and beautifully quotable.

Dropbox is this way, not any other way!

Blizzard

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.

ShadowSaber

Quote from: Blizzard on April 11, 2011, 04:14:59 am
Just insert is above main and that's that. No need to do anything.


i didn't understand, I placed the script above main and the script have no effect?
I even testing it in new project without any custom script

Blizzard

I made a small mistake, my bad. Try this.

module MapManager
 
  @maps = {}
  def self.get_map(map_id)
    if !@maps.has_key?(map_id)
      @maps[map_id] = Game_Map.new
      @maps[map_id].setup_mapmanager_alias(map_id)
    end
    return @maps[map_id]
  end
 
end

class Game_Map
 
  alias setup_mapmanager_alias setup
  def setup(map_id)
    $game_map = MapManager.get_map(map_id)
  end
 
end

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.

ShadowSaber


nathmatt

here
Spoiler: ShowHide
class EventManager
  attr_accessor :events
  def initialize
    @events = {}
  end
end
$eventmanager =  EventManager.new
class Game_Map
  attr_reader   :events
  alias setup_eventmanager_alias setup
  def setup(map_id)
    setup_eventmanager_alias(map_id)
    if $eventmanager.events[map_id] != nil
      @events = $eventmanager.events[map_id]
      refresh
    else
      $eventmanager.events[map_id] = @events
    end
  end
 
end
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


ShadowSaber