[Ace] Animation moving with player, how do i prevent that?

Hi, me again. I'm playing an animation above one event and it works wonders, but if i move the character one tile left while the animation is playing the animation too will move one tile left and then it'll not play in the right position.. how can i prevent that? Or wasn't this supposed to happen at all?
A simple fix would be to have a second event with no graphic, and when you play the animation, move that event to the same position as the visible one, and play the animation on the no-graphic event. Make sure you set it up so both the player and other events can move over it.
A simple fix would be to have a second event with no graphic, and when you play the animation, move that event to the same position as the visible one, and play the animation on the no-graphic event. Make sure you set it up so both the player and other events can move over it.
I get it, but is that a bug from rpg maker?
Probably not. When you show an animation, you associate it with an event. It makes sense that it should stick with that event.
I tested with events and you're right, they stick with the event... I don't know what i'm doing wrond so i'll post my codes here.

When you press a button that will start the process, this will be executed. It gets the event and moves to player position



Code:
def use
    dt_get_event(tool)
    dt_event_setup(@dt_event)
end

def dt_get_event(ferramenta)
    events.each do |i, event|
	  if event.list != nil
	    for i in 0...event.list.size
		    if event.list[i].code == 108 && event.list[i].parameters == [Gleen::DT::EVENTHANDLER]
			  @dt_event = event
		    end
	    end
	  end
    end

def dt_event_setup(event)
    event.moveto($game_player.x, $game_player.y)
end
Here is my update method to check if the animation can be played:



Code:
def dt_update_timer
    if @timer == 60
	  @trigger = true
	  @dt_event.animation_id = 100
	  clear_ok?(@dt_event)
    else
	  @timer += 1
    end
  end

def clear_ok?(event)
    mr = RPG::MoveRoute.new
    mr.repeat = false
    mr.wait = true
    mr.skippable = true
    mc = RPG::MoveCommand.new
    mc.code = 15
    mc.parameters = [36]
    mc2 = RPG::MoveCommand.new
    mc2.code = 45
    mc2.parameters = ["$game_map.dt_clear_event"]
    mr.list[0] = mc
    mr.list[1] = mc2
    event.force_move_route(mr)
  end
And here is the last method executed, wich clears everything:



Code:
def dt_clear_event
    dt_get_event(tool)
    if @dt_event != nil
	  @dt_event.moveto(0,0)
	  @dt_event.dt_change_graphic(@dt_event, "clear") # clears the event graphic
    end
  end
As far as i know, i'm not doing anything wrong here and that animation still moves...
Are you playing the animation on the event that doesn't move? You only want that to move to the other event's position once, not over and over.
Yeah, the event don't move. Only the animation...

I noticed that in maps with minimal size (17x13) this bug doesn't occur, only in bigger maps when the screen moves, the animation follow the movement.
Oh, it sounds like it IS a bit of a bug, then - if your character moves around while it's going on, and it does one thing on a small map and another on a big map.

You should report it in the unofficial bugs thread - if they do a patch, it might be easy enough to add a fix for this.
No. it's something with my code. I created another project and tested. The animation don't move when i move. Even in big maps.
This might solve it.

Original thread: https://forums.rpgmakerweb.com/threads/ace-animation-moving-with-player-how-do-i-prevent-that.2863/