Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> Can I change my Unarmed animation for my characters?, RPG maker vx user here :(
Bandito
post Nov 28 2012, 08:59 PM
Post #1


Level 3
Group Icon

Group: Member
Posts: 36
Type: None
RM Skill: Beginner




Does the unarmed animation (for a character that does not have a weapon),always has to be the first slot in the animation tab in the database or is there a way to change it? I am using the DBS with no scripts used at all. I am using rpgmaker vx.

Like for example CharA is not using a weapon but I want his unarmed animation to be different from charB unarmed animation. That could be because charA has human hands and charB has fangs for example.
Go to the top of the page
 
+Quote Post
   
Jens of Zanicuud
post Nov 29 2012, 09:49 AM
Post #2


Dark Jentleman
Group Icon

Group: Local Mod
Posts: 916
Type: Scripter
RM Skill: Skilled
Rev Points: 120




You can, you just have to simply modify a couple lines in the script editor:

Add this snippet inside the Materials section:

CODE
#==============================================================================
# ** Game_Actor
#------------------------------------------------------------------------------
#  This class handles actors. It's used within the Game_Actors class
# ($game_actors) and referenced by the Game_Party class ($game_party).
#==============================================================================
class Game_Actor < Game_Battler
  #--------------------------------------------------------------------------
  # * Invariables
  #--------------------------------------------------------------------------
  #fille the hash this way:
  #UNARMED_ANIME_ID = {
  #actor id => unarmed animation id,
  #actor id => unarmed animation id,
  #actor id => unarmed animation id,
  #[add as many actors as you want]
  #}
  #if you don't insert an actor in this hash, his/her animation will be
  #the default unarmed animation
   UNARMED_ANIME_ID = {
   1 => 7,
   2 => 12,
   }
  #--------------------------------------------------------------------------
  # * Get Normal Attack Animation ID
  #--------------------------------------------------------------------------
  def atk_animation_id
    anime_id = 1
    anime_id = UNARMED_ANIME_ID[self.id] if UNARMED_ANIME_ID.include?(self.id)
    if two_swords_style
      return weapons[0].animation_id if weapons[0] != nil
      return weapons[1] == nil ? anime_id : 0
    else
      return weapons[0] == nil ? anime_id : weapons[0].animation_id
    end
  end
end


I hope this can help,

Jens


__________________________
"Thorns are the rose's sweetest essence..."
-Jens of Zanicuud


Games I'm working on:
>

official website: TryAdIne eFfeCt

>

Games I worked on (mainly as a scripter):
>
(Warning: it's a 3rr3's project and it's in Italian!)


Awards

Go to the top of the page
 
+Quote Post
   
Bandito
post Dec 1 2012, 08:33 PM
Post #3


Level 3
Group Icon

Group: Member
Posts: 36
Type: None
RM Skill: Beginner




It works perfect thank you. I am going to include in the credits btw.
Go to the top of the page
 
+Quote Post
   
Jens of Zanicuud
post Dec 2 2012, 02:41 AM
Post #4


Dark Jentleman
Group Icon

Group: Local Mod
Posts: 916
Type: Scripter
RM Skill: Skilled
Rev Points: 120




I'm glad I could be of any help
Thank you, if you need some further little help, just ask smile.gif

Jens


__________________________
"Thorns are the rose's sweetest essence..."
-Jens of Zanicuud


Games I'm working on:
>

official website: TryAdIne eFfeCt

>

Games I worked on (mainly as a scripter):
>
(Warning: it's a 3rr3's project and it's in Italian!)


Awards

Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 19th June 2013 - 03:22 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker