[RMVX ACE] SHOWING ANIMATION AT COORDINATES
Posts
Pages:
1
Does anyone know how to show an animation at specified coordinates (via variables).
RPGVX ACE only allows aniamtions to be set to events, but i'd like to show one at a specified location instead.
Let me paint the scenario first, i'm using an ABS (SaS to be exact) and i've tweaked it a bit to the point of it running a common event when a specialized particle hits an obstruction(doesn't have to be an event). When this happen the common events will dammage all enemies and the player in a set radius of the impact(think something like a missile). Problem is I want to show a visual que that matches the dammage done(Neutral One). Since multiple occurances of this can happen at once on different maps I would like to avoid the use of proxy events, so does anyone know how to show an animation at a specified location in RPGVX ACE?
Thanks in advance
RPGVX ACE only allows aniamtions to be set to events, but i'd like to show one at a specified location instead.
Let me paint the scenario first, i'm using an ABS (SaS to be exact) and i've tweaked it a bit to the point of it running a common event when a specialized particle hits an obstruction(doesn't have to be an event). When this happen the common events will dammage all enemies and the player in a set radius of the impact(think something like a missile). Problem is I want to show a visual que that matches the dammage done(Neutral One). Since multiple occurances of this can happen at once on different maps I would like to avoid the use of proxy events, so does anyone know how to show an animation at a specified location in RPGVX ACE?
Thanks in advance
So, here's some of the things I'm looking at. First, the "Show Animation" process that the event-command actually uses:
I also took a look at how the default combat engine handles animations:
I understand that, by using any custom battle system, the combat functionality would be different. In regards to an ABS, it probably uses a very similar processing to the regular "Show Animation" processing. However, it is notable that animations are generally attributable to events, or battlers. This might yet be information that could be useful, as on-screen enemies are events.
To be honest, the feeble attempt that I made to fulfill this request as written was to use "dummy" events like...
...so. This code seemed to cause a game-freeze when "wait" was true, and didn't seem to do anything when it was false. The alternative method looked like...
...so. This, or similar variants thereof, seemed to do absolutely nothing.
One supposition that could be workible is to make an "animation_id" property for the Game_Map class. I have no idea how to go about making that property actually work the way it's supposed to, however!
I'm getting a bit of a headache from this at the moment, but, I'm hoping there is something in this post that could be used?
#-------------------------------------------------------------------------- # * Show Animation #-------------------------------------------------------------------------- def command_212 character = get_character(@params[0]) if character character.animation_id = @params[1] Fiber.yield while character.animation_id > 0 if @params[2] end end
I also took a look at how the default combat engine handles animations:
#-------------------------------------------------------------------------- # * Show Attack Animation # targets : Target array # Account for dual wield in the case of an actor (flip left hand weapon # display). If enemy, play the [Enemy Attack] SE and wait briefly. #-------------------------------------------------------------------------- def show_attack_animation(targets) if @subject.actor? show_normal_animation(targets, @subject.atk_animation_id1, false) show_normal_animation(targets, @subject.atk_animation_id2, true) else Sound.play_enemy_attack abs_wait_short end end #-------------------------------------------------------------------------- # * Show Normal Animation # targets : Target array # animation_id : Animation ID # mirror : Flip horizontal #-------------------------------------------------------------------------- def show_normal_animation(targets, animation_id, mirror = false) animation = $data_animations[animation_id] if animation targets.each do |target| target.animation_id = animation_id target.animation_mirror = mirror abs_wait_short unless animation.to_screen? end abs_wait_short if animation.to_screen? end end
I understand that, by using any custom battle system, the combat functionality would be different. In regards to an ABS, it probably uses a very similar processing to the regular "Show Animation" processing. However, it is notable that animations are generally attributable to events, or battlers. This might yet be information that could be useful, as on-screen enemies are events.
To be honest, the feeble attempt that I made to fulfill this request as written was to use "dummy" events like...
def show_animation(anim_id, x, y, wait=false) event = Game_Event.new($game_map.map_id, RPG::Event.new(x, y)) if event event.animation_id = anim_id Fiber.yield while event.animation_id > 0 if wait end end
...so. This code seemed to cause a game-freeze when "wait" was true, and didn't seem to do anything when it was false. The alternative method looked like...
def show_animation(anim_id, x, y, wait=0) event = Game_Event.new($game_map.map_id, RPG::Event.new(x, y)) if event event.animation_id = anim_id while wait >=0 event.update wait -= 1 end end end
...so. This, or similar variants thereof, seemed to do absolutely nothing.
One supposition that could be workible is to make an "animation_id" property for the Game_Map class. I have no idea how to go about making that property actually work the way it's supposed to, however!
I'm getting a bit of a headache from this at the moment, but, I'm hoping there is something in this post that could be used?
Thank you for your reply,
just like you said I tried it with dummy/proxy events and after a few issues with my antilag script (my initial reason for not wanting to use dummies) I managed to get it to work using Fomar's copy events script.
The common event containing the script calls if anyone is interested in the future.
The event that is called upon simply risn an animation targeting itself before erasing itself.
Yay it works :)
I guess actually playing animations at specified coordinates takes a lot of work and since this also solves the problem this problem can be considered solved.
Thanks a lot Marrend!
just like you said I tried it with dummy/proxy events and after a few issues with my antilag script (my initial reason for not wanting to use dummies) I managed to get it to work using Fomar's copy events script.

The common event containing the script calls if anyone is interested in the future.
The event that is called upon simply risn an animation targeting itself before erasing itself.
Yay it works :)
I guess actually playing animations at specified coordinates takes a lot of work and since this also solves the problem this problem can be considered solved.
Thanks a lot Marrend!
Pages:
1














