Move Events Ex

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,696
Reaction score
3,006
First Language
Tagalog
Primarily Uses
RMVXA
Overview

Well, normally you cannot move events in between tiles, and this snippet gives you the power to do so via a simple script call.

Take note though that this is suggested to only be used for decorative events and those that run autorun/parallel as this might cause activation bug if used on events triggered by Action button and touch events.

Script

=beginHow to use:simply make a script call in an event,preferable parallel so it runs beforeyou see the map, then just erase itevent_move_ex(id,x,y)-> id = Event ID-> x = Map X (can have decimals)-> y = Map Y (can have decimals)=endclass Game_Interpreter def event_move_ex(id,x,y) $game_map.events[id].movetox(x,y) endendclass Game_Event def movetox(x, y) @x = x @y = y @real_x = @x @real_y = @y @prelock_direction = 0 straighten update_bush_depth endend
Terms

Free for anything, it's a really simple snippet
 

Mithran

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
404
Reaction score
214
First Language
English
Primarily Uses
Keep in mind that moving events to decimal coordinates like this will make them 'stick' at those decimal coordinates until specifically moved off of them, they will not be able to collide with anything other than things at their same decimal level. Simply using the default character.moveto command has this same behavior, and will also take decimals. If you wanted this command to immediately move the event onto the nearest logical tile so it can still be interacted with, you need to round the @x and @y coordinates in your command, passing the decimals only into real_x and real_y.
 

tale

Volunteer
Veteran
Joined
Dec 16, 2016
Messages
639
Reaction score
1,083
First Language
English
Primarily Uses
N/A
Fixed script format, credit Adiktuzmiko.
Code:
=begin
How to use:
simply make a script call in an event,
preferable parallel so it runs before
you see the map, then just erase it
event_move_ex(id,x,y)
-> id = Event ID-> x = Map X (can have decimals)-> y = Map Y (can have decimals)
=end
class Game_Interpreter
  def event_move_ex(id,x,y)
    $game_map.events[id].movetox(x,y)
  end
end
class Game_Event
  def movetox(x, y)
    @x = x
    @y = y
    @real_x = @x
    @real_y = @y
    @prelock_direction = 0
    straighten
    update_bush_depth
end
end
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Turns out 4 layers is A LOT.
I noticed random Japanese dialogue in the FF7 remake while playing in English. More than once. Just now I saved a vid where Tifa spoke Japanese after a battle. We all make mistakes lol, this is kinda funny though
I wonder if the new RPG Maker will have a built-in ABS for maps or a light effect system plugin out of the box.
Not having false expectations, but if it has both, then wow. I am gonna party all night. Nah I lie. I will party all night anyway, just searching for a good excuse. :stickytongue:
And BAM!, the moment you do understand Python setters by studying JS prototypes. That's called SERENDIPITY, coming with something when you was searching for something else. From "The three Princes of Serendib", a persian novel.
The sinking feeling when you realize your grandmother probably isn't long for this world, and the frustration when you know that this pandemic will take her away...not because she has Covid, but because no doctor is willing to see a patient to even run simple diagnostics anymore if one of her symptoms happens to be a recurring fever, even if her primary care physician gives her the test and it comes back negative.

Forum statistics

Threads
99,624
Messages
967,381
Members
131,294
Latest member
Lovekraft
Top