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...