arevulopapo;327919 said:
Thanks for suggestions

Unforunatelly I don't quite understand what I'd need to do for this ^^ Would be nice if you could elaborate on this a little more
Sure.
When an animations is shown on a Game_Character instance, ie $game_player, their "animation_id" is set to the animation's id. Like so:
$game_player.animation_id = 0 # means no animation
The Sprite_Character method checks if there is a current animation by:
# Animation
if @character.animation_id != 0
animation = $data_animations[@character.animation_id]
animation(animation, true)
@character.animation_id = 0
end
You don't need to worry about that really, its just to get you familiar with the system.
First of all, you would need a way for you to tell if an animation id is a particle animation id. To do this, you can add a hash to your script:
Animation_List = {}
Animation_List[animation_id] = [effect, lock, x, y]
You want that somewhere you can easily access, like a module(I'll use a module named Particle for this example).
Next you want to edit the place where the animation is executed, which is in RPG::Sprite:
def animation(animation, hit)
dispose_animation
@_animation = animation
return if @_animation == nil
@_animation_hit = hit
@_animation_duration = @_animation.frame_max
animation_name = @_animation.animation_name
animation_hue = @_animation.animation_hue
bitmap = RPG::Cache.animation(animation_name, animation_hue)
if @@_reference_count.include?(bitmap)
@@_reference_count[bitmap] += 1
else
@@_reference_count[bitmap] = 1
end
@_animation_sprites = []
if @_animation.position != 3 or not @@_animations.include?(animation)
for i in 0..15
sprite = ::Sprite.new(self.viewport)
sprite.bitmap = bitmap
sprite.visible = false
@_animation_sprites.push(sprite)
end
unless @@_animations.include?(animation)
@@_animations.push(animation)
end
end
update_animation
end
You want to edit that to check if the animation ID is actually a particle effect:
def animation(animation, hit)
dispose_animation
if Particle::Animation_List.has_key(animation.id)
else
@_animation = animation
return if @_animation == nil
@_animation_hit = hit
@_animation_duration = @_animation.frame_max
animation_name = @_animation.animation_name
animation_hue = @_animation.animation_hue
bitmap = RPG::Cache.animation(animation_name, animation_hue)
if @@_reference_count.include?(bitmap)
@@_reference_count[bitmap] += 1
else
@@_reference_count[bitmap] = 1
end
@_animation_sprites = []
if @_animation.position != 3 or not @@_animations.include?(animation)
for i in 0..15
sprite = ::Sprite.new(self.viewport)
sprite.bitmap = bitmap
sprite.visible = false
@_animation_sprites.push(sprite)
end
unless @@_animations.include?(animation)
@@_animations.push(animation)
end
end
update_animation
end
end
Once you do that, you make sure the current scene is Scene_Map, since you made your script to use Scene_Map(bad choice :-p)
def animation(animation, hit)
dispose_animation
if Particle::Animation_List.has_key(animation.id)
if $scene.is_a?(Scene_Map)
a = Animation_List[animation.id]
$scene.add_effect(@character.id,a[0],a[1],a[2],a[3])
end
else
@_animation = animation
return if @_animation == nil
@_animation_hit = hit
@_animation_duration = @_animation.frame_max
animation_name = @_animation.animation_name
animation_hue = @_animation.animation_hue
bitmap = RPG::Cache.animation(animation_name, animation_hue)
if @@_reference_count.include?(bitmap)
@@_reference_count[bitmap] += 1
else
@@_reference_count[bitmap] = 1
end
@_animation_sprites = []
if @_animation.position != 3 or not @@_animations.include?(animation)
for i in 0..15
sprite = ::Sprite.new(self.viewport)
sprite.bitmap = bitmap
sprite.visible = false
@_animation_sprites.push(sprite)
end
unless @@_animations.include?(animation)
@@_animations.push(animation)
end
end
update_animation
end
end
Also add this:
class Game_Character
attr_accessor :id
alias av_particle_game_char_int initialize
def initialize
@id = -1
av_particle_game_char_int
end
end
Thats about all I see from your script.