• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Remember event position compatible with essentials

69
Posts
14
Years
    • Seen Nov 19, 2014
    Well i don´t know if i can´t put a link of another RPG Maker forum so i will paste the script i found:

    Code:
    #Script made by LiTTleDRAgo
    # to clear event position in maps:
    #     $game_map.event_positions[MAP_ID] = nil
    # or
    #     $game_map.event_positions.delete(MAP_ID)
    
    # to clear event position in all maps:
    #     $game_map.event_positions.clear
    
    
    class Game_Map
    
      alias_method(:setup_eventmanager_alias, :setup)
      define_method(:event_positions) { @event_positions ||= {}}
    
      def setup(map_id)
        setup_eventmanager_alias(map_id)
        if self.event_positions[map_id]
          (@events = self.event_positions[map_id]) && refresh
        else
          (self.event_positions[map_id] = @events)
        end
      end
    end

    But when i put it in my game it doesn´t work, an older version of this script could remember the position of events but it has graphical problems and didn´t save the position when the savegame where loaded.

    I hope that Maruno see this and can help with this because this will be a very useful script.
     
    60
    Posts
    10
    Years
    • Seen Jul 9, 2015
    I agree some scripts such as More ways to trigger (event triggering event and so on) or that could make life easier, but in most cases you can easily find a (harder) alternative.

    This + Self switches could easily do the job in most cases, I'm not totally sure what you're trying to do but, almost always this is more than enough.
     
    69
    Posts
    14
    Years
    • Seen Nov 19, 2014
    What i want is that my game could save the position of an event even when the player goes to another map, and if he return to the map the event will still be in the same position

    Example: I´m in MAP1 and i make a NPC to move from his initial position(from POSITION1 to POSITION2), then i move myself to MAP2, after that i comeback to MAP1 and i want that NPC to be in POSITION2, in RPG Maker XP this doesn´t happen but this script can make what i want but doesn´t work in Essentials :/
     

    tImE

    It's still me, 44tim44 ;)
    673
    Posts
    17
    Years
  • What i want is that my game could save the position of an event even when the player goes to another map, and if he return to the map the event will still be in the same position

    Example: I´m in MAP1 and i make a NPC to move from his initial position(from POSITION1 to POSITION2), then i move myself to MAP2, after that i comeback to MAP1 and i want that NPC to be in POSITION2, in RPG Maker XP this doesn´t happen but this script can make what i want but doesn´t work in Essentials :/

    Well, you could always use Control Switches.

    Make 2 NPCs, one in POSITION1 and an invisble one in POSITION2.
    Make NPC1 in POSITION1 move to POSITION2 and set a control switch so that NPC1 becomes invisble and NPC becomes visible.

    Congratulations, your NPC has permanently moved!
     

    Nickalooose

    --------------------
    1,309
    Posts
    16
    Years
    • Seen Dec 28, 2023
    What tImE said is exactly what I would do, you're over complicating things... When it's as simple as moving your event and using switches, that's what they're there for, there is always a way around scripting useless junk... Switches and Variables are the way.
     
    69
    Posts
    14
    Years
    • Seen Nov 19, 2014
    Well i know i can do what i want in some way. I´m working in a map where a third event control NPC1 and move it to POSITION2 so from this event i can´t set a control switch (i know i can use a global switch but i don´t want my game with 1000 global switches).
     
    1,224
    Posts
    10
    Years
  • I don't know how to fix it, but reviving this thread because I realized that this would be a great way to recreate secret bases.
     

    FL

    Pokémon Island Creator
    2,453
    Posts
    13
    Years
    • Seen May 10, 2024
    I don't know how to fix it, but reviving this thread because I realized that this would be a great way to recreate secret bases.
    You can easily do these thing with secret base using "Set Event Location" for putting the X and Y positions, plus using other variable for defining the furniture type.
     
    Back
    Top