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

Gleen

Veteran
Veteran
Joined
Jun 14, 2012
Messages
98
Reaction score
21
First Language
portuguese
Primarily Uses
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?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
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.
 

Gleen

Veteran
Veteran
Joined
Jun 14, 2012
Messages
98
Reaction score
21
First Language
portuguese
Primarily Uses
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?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Probably not. When you show an animation, you associate it with an event. It makes sense that it should stick with that event.
 

Gleen

Veteran
Veteran
Joined
Jun 14, 2012
Messages
98
Reaction score
21
First Language
portuguese
Primarily Uses
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...
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
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.
 

Gleen

Veteran
Veteran
Joined
Jun 14, 2012
Messages
98
Reaction score
21
First Language
portuguese
Primarily Uses
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.
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
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.
 

Gleen

Veteran
Veteran
Joined
Jun 14, 2012
Messages
98
Reaction score
21
First Language
portuguese
Primarily Uses
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.
 

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

Latest Threads

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD

Forum statistics

Threads
105,868
Messages
1,017,070
Members
137,577
Latest member
SadaSoda
Top