Hi guys.
I think this time I posted in the correct section, right...? I have been trying to be very careful...
Anyway, I was wondering if I can get some help with Yami's Symphony script. I've been playing around with the notetags, and I think I do have a reasonable amount of knowledge regarding the tags, but for the life of me I can't figure this one out.
I'm making a skill called Thunder Orb, where I create an icon, play an animation on the icon, then throw the icon to the target, and then playing an animation on the target when the orb hits. My problem is this: when I throw the icon, the animation on the icon sticks on the actor's hand instead of following the icon thrown. I don't know if Yami's script has a function which makes the animation follow the icon when it's thrown, or just something in general that can make animations move across the map. Here's what I did in the notetag:
<whole action>
hide nonfocus
move user: forward, wait
animation 113: user
create icon: user, item, hand, 143
icon effect: user, item, animation 114
wait: 20
icon throw user: target, item, 0, 24, wait
icon delete: user, item
animation 16: target
skill effect: dmg, calc
move target: backward, wait
show nonfocus
</whole action>
I'm forced to use whole action instead of target action because it's a magic attack, and for some reason target action makes magic attacks hit twice (once before the target action executes, and once during skill effect, if anyone can help me with this it'll be awesome too but not a priority rn). Can anyone tell me what I'm doing wrong...?
Edit: Okay, so I've taken a look at the script and I
think (since I don't have the faintest idea about scripting) that there isn't any method which makes the animation follow the thrown item.
#--------------------------------------------------------------------------
# new method: action_icon_throw
#--------------------------------------------------------------------------
def action_icon_throw
mains = get_action_mains
targets = get_action_targets
return if mains.size == 0
#---
case @action_values[1]
when "WEAPON", "WEAPON1"
symbol = :weapon1
when "WEAPON2"
symbol = :weapon2
when "SHIELD"
symbol = :shield
when "ITEM"
symbol = :item
else
symbol = @action_values[1]
end
#---
mains.each { |main|
icon = main.icons[symbol]
next if icon.nil?
total_frames = @action_values[3].to_i
total_frames = 12 if total_frames <= 0
arc = @action_values[2].to_f
#---
targets.each { |target|
move_x = target.screen_x
move_y = target.screen_y - target.sprite.height / 2
icon.create_movement(move_x, move_y, total_frames)
icon.create_arc(arc)
if @action_values.include?("WAIT")
update_basic while icon.effecting?
end
}
}
end
So there's the icon throw method, and there isn't a line for the animation on the icon thrown. I'm assuming that the animation would also need to use the create_movement method, but I don't have enough knowledge to create a variable attached to the icon's animation.
when /ANIMATION[ ](\d+)/i
animation = $1.to_i
if $data_animations[animation].nil?; return; end
total_frames = $data_animations[animation].frame_max
total_frames *= 4 unless $imported["YEA-CoreEngine"]
total_frames *= YEA::CORE::ANIMATION_RATE if $imported["YEA-CoreEngine"]
icon.start_animation($data_animations[animation])
That's the animation section for icon effect. I don't know how to create a variable attached to that function.
If anyone wants to take a look at the script, the link is
https://raw.githubusercontent.com/suppayami/rmvxa-collection/master/battle-symphony/battle-symphony-116e.rb
Any help from anyone will be deeply appreciated. :'( Please. My thunder orb looks lame without an animation on the icon.