Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

[forget it, i found a workaround] ignore me

base script can be found here viewtopic.php?f=11&t=60521

alright topic pretty much says it, ive been trying to get weapon animations to play in tankentai on attacks, it plays the weapon swing with the weapon icon, but i want it to play the "attacker animation" of the weapon instead of the icon, but only for certain weapons.

example the bow/gun/spear add-on scripts, they change the way the attack is carried out based on an element ID, what id like to do is set up an add-on that uses the weapons attacker animation rather than the default icon weapon swing.

from looking at the bow addon, i can see that the script calls a specific animation ID, and i suppose i could set it up that way, but i would have to used like 30-40 different script entries, and use an individual element ID per weapon , but id rather not do that.

i just want one element ID add-on thing that calls the attacker animation of the weapon, any help would be greatly appreciated
 
i figured out a way to make it work, but i can only figure out the above mentioned script for each weapon i want to use a different animation with way,

which means ill have to do this:

Code:
#==============================================================================

# Add-On: Attacker Animation

# by Gulch

#------------------------------------------------------------------------------

# This script changes the attackers animation to the "Attacker Animation" of the weapon 

# To use this script, verify if your weapons have the attribute with the same 

# ID as ANIMATION_ELEMENT in the weapon's tab of your database.

#==============================================================================

 

module N01

  # Element for the weapon/skill that used the Attacker Animation

  ANIMATION_ELEMENT = 27

  # Attack Animation

  ANIMATION_ANIME = {

    "THE_LOST"          => ["m_a", 15,   4,  0,  16,   0,  0,  0, 0,false,""],

    }

  ANIME.merge!(ANIMATION_ANIME)

  # Action Sequence

  ANIMATION_ATTACK_ACTION = {

    "ANIMATION_ATTACK"=> ["PREV_MOVING_TARGET", "THE_LOST", "10", "OBJ_ANIM_WEAPON",

                      "12", "OBJ_ANIM_L","Two Wpn Only","16",

                      "Can Collapse","FLEE_RESET"],}

  ACTION.merge!(ANIMATION_ATTACK_ACTION)

end

 

module RPG

  #------------------------------------------------------------------------------

  class Weapon

    alias gulch_animation_base_action base_action

    def base_action

      # If the "animation" attribute is marked on the weapon's element, 

      # the new attack sequence is used

      if $data_weapons[@id].element_set.include?(N01::ANIMATION_ELEMENT)

        return "ANIMATION_ATTACK"

      end

      gulch_animation_base_action

    end

  end

  #------------------------------------------------------------------------------

  class Skill

    alias gulch_animation_base_action base_action

    def base_action

      # If the "animation" attribute is marked on the weapon's element, 

      # the new attack sequence is used

      if $data_skills[@id].element_set.include?(N01::ANIMATION_ELEMENT)

        return "ANIMATION_ATTACK"

      end

      gulch_animation_base_action

    end

  end

end

 


about 30+ times, i dont particularly want to do that lol
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top