Can someone edit this VERY SHORT script, to allow animation, please?

Started by Seox, March 19, 2009, 12:06:46 am

Previous topic - Next topic

Seox

Hello.

I'm using tankentai side view battler, and this is an addon for guns. I like the PHYSICAL animation, in that the actor jumps back, pulls gun, and shoots, but the default sound is a little bland. I turned it down, and I just make the enemy animation play the gunshot sound. However, this is not matched to the recoil when the actor shoots, and so it looks very crappy. I tried to make the target animation the bullet and the attacker animation the sound. However, this script snippet always overwrites the standard animation. Therefore, I want it to KEEP the movements of the actor, but allow the normal animation to play as well. Please help. I can't just edit the default sound, as I want different ones for different weapons.

Spoiler: ShowHide
#==============================================================================
# Add-On: Guns 1.1
# by Kylock
#------------------------------------------------------------------------------
# This Add-On allows you to use additional animations for guns.
# To use this script, verify if your guns have the attribute with the same
# ID as GUN_ELEMENT in the weapon's tab of your database.
#==============================================================================

module N01
  # Element for the weapon/skill that has the Gun Animation
  GUN_ELEMENT = 27
    ANIME.merge!(RANGED_ANIME)
   # Attack Animation
  RANGED_ANIME = {
   "GUNSHOT" => ["sound", "se",  0, 0, "close1"],}
  # Action Sequence
  RANGED_ATTACK_ACTION = {
    "GUN_ATTACK" => ["JUMP_AWAY","WPN_SWING_V","30","GUNSHOT","WPN_SWING_V",
        "OBJ_ANIM_WEIGHT","12","WPN_SWING_VL","OBJ_ANIM_L","One Wpn Only",
        "16","Can Collapse","JUMP_TO","COORD_RESET"],}
  ACTION.merge!(RANGED_ATTACK_ACTION)
end

module RPG
  #------------------------------------------------------------------------------
  class Weapon
    alias kylock_guns_base_action base_action
    def base_action
      # If the "Gun" attribute is marked on the weapon's element,
      # the new attack sequence is used
      if $data_weapons[@id].element_set.include?(N01::GUN_ELEMENT)
        return "GUN_ATTACK"
      end
      kylock_guns_base_action
    end
  end
  #------------------------------------------------------------------------------
  class Skill
    alias kylock_sguns_base_action base_action
    def base_action
      # If the "Gun" attribute is marked on the weapon's element,
      # the new attack sequence is used
      if $data_skills[@id].element_set.include?(N01::GUN_ELEMENT)
        return "GUN_ATTACK"
      end
      kylock_sguns_base_action
    end
  end
end


Please and thank you ^_^
... (<<<<<<<<<<<<<<< TEH DOTS OF DOOM. Hey, kinda catchy. :naughty:)

Landith

Just change the frame in which the sound is played in the animation.

Seox

... (<<<<<<<<<<<<<<< TEH DOTS OF DOOM. Hey, kinda catchy. :naughty:)

legacyblade

edit the actual sound file to have less silence at the beginning.

Seox

THAT wouldn't work because it plays the same sound for every gun. A supressed handgun doesn't sound like .357 magnum ><

I can't back up the sound in the enemy animation, as it's the first thing to play. Attacker animation won't work. This seems to be the only solution.

But I might be wrong. ><
... (<<<<<<<<<<<<<<< TEH DOTS OF DOOM. Hey, kinda catchy. :naughty:)