Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 AnimBat! - Animated Battlers - Comprehensive
redtri17 is now showing off. Laughing + Tongue sticking out He reported another error, related to the first. I saw this at midnight, and figured it out 15 minutes later. How's that for analysis and system design?

We have to revisit the same method, the animbat_function_update_phase4_step3_pose_attack method. Just for cleanliness sake, just use THIS in its place. Yeah, it's the same line... but why take chances?

Code:
#--------------------------------------------------------------------------
  # * Frame Update (main phase step 3 : animation for action performer)
  #   * Select Attack Pose
  #     battler : battler
  #--------------------------------------------------------------------------
  def animbat_function_update_phase4_step3_pose_attack(battler)
    base_pose   = hash_obtain2(battler, 7, AnimBat::POSE_07)
    temp_hash   = hash_obtain2(battler, nil, AnimBat::ATTACK_WEAPONS)
    unless temp_hash.nil?
      temp_pose = hash_obtain2(battler.weapon_id, nil, temp_hash)
    end
    base_pose = temp_pose unless temp_pose.nil?
    return base_pose
  end

But we're not done yet.

Look at the Hash Obtain2 method and how it looks. A clean method, it accepts a 'battler' as its initial value, recognizing it as an actor or enemy, and obtains the actor/enemy ID from it. But look further and see that it also accepts the ID of weapons or skills.

OOPS! I LEFT THAT PORTION OUT!

The fault does not lie within the hash_obtain2 method, but the base hash_obtain method which it uses. I needed to let it recognize if the value being sent into the method is an actual battler, or just some value to search... so replace the actual hash_obtain method with this! Erm, leaving hash_obtain2 untouched. That one's fine.

Code:
#--------------------------------------------------------------------------
  # * Hash Value Obtain
  #     battler : battler being tested against (or ID if it is not a battler)
  #     default : default value
  #     testval : hash array
  #     minval  : (optional) minimum value
  #     maxval  : (optional) maximum value
  #--------------------------------------------------------------------------
  def hash_obtain(battler, default, testval, minval=nil, maxval=nil)
    if battler.is_a?(Game_Battler)
      id        = (battler.is_a?(Game_Enemy)) ? -battler.id : battler.id
    else
      id        = battler
    end
    returnval = default
    return returnval          if testval.nil?
    returnval = testval[0]    if testval.has_key?(0)
    returnval = testval[id]   if testval.has_key?(id)
    unless default.nil?
      returnval = minval      if minval != nil && returnval < minval
      returnval = maxval      if maxval != nil && returnval > maxval
    end
    return returnval
  end

And now, it's version 1.2!!! Dated 9/17/2019 (mm/dd/yyyy).

It'll take some time to generate all the demos. I have obligations to perform tomo--- this morning.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png] [Image: liM4ikn.png] [Image: fdzKgZA.png] [Image: sj0H81z.png]
[Image: QL7oRau.png] [Image: uSqjY09.png] [Image: GAA3qE9.png] [Image: 2Hmnx1G.png] [Image: BwtNdKw.png%5B]
Above are clickable links

Reply }


Messages In This Thread
RE: AnimBat! - Animated Battlers - Comprehensive - by DerVVulfman - 09-17-2019, 05:28 AM
Minkoff's Animated Battlers - Enhanced - by Helel - 11-28-2009, 08:40 AM
Minkoff's Animated Battlers - Enhanced - by Calum - 12-02-2009, 09:29 AM
Minkoff's Animated Battlers - Enhanced - by Calum - 12-02-2009, 09:15 PM
Minkoff's Animated Battlers - Enhanced - by Calum - 12-03-2009, 04:40 AM
Minkoff's Animated Battlers - Enhanced - by Calum - 12-03-2009, 05:03 AM
Minkoff's Animated Battlers - Enhanced - by Calum - 12-03-2009, 09:02 PM
Minkoff's Animated Battlers - Enhanced - by Ace - 02-21-2010, 11:19 AM
Minkoff's Animated Battlers - Enhanced - by Ace - 02-28-2010, 02:09 PM
Minkoff's Animated Battlers - Enhanced - by Ace - 02-28-2010, 09:44 PM
Minkoff's Animated Battlers - Enhanced - by Eldur - 03-03-2010, 06:44 PM
Minkoff's Animated Battlers - Enhanced - by Crono - 06-23-2010, 04:53 AM
Minkoff's Animated Battlers - Enhanced - by Crono - 06-23-2010, 05:55 AM
Minkoff's Animated Battlers - Enhanced - by Crono - 06-24-2010, 05:24 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
   Brenda's Paperdoll Battlers DerVVulfman 2 7,058 04-18-2023, 02:05 AM
Last Post: DerVVulfman
   Animated Battlers - VX DerVVulfman 23 46,655 02-28-2019, 09:11 PM
Last Post: Holder
   DoubleX RMMV Linked Battlers DoubleX 3 7,890 01-29-2016, 04:15 PM
Last Post: DoubleX
   DoubleX RMVXA Linked Battlers DoubleX 1 5,651 11-08-2015, 04:29 AM
Last Post: DoubleX
   Victor Engine - Animated Battle Victor Sant 4 13,769 03-10-2012, 06:42 PM
Last Post: Victor Sant
   Victor Engine - Automatic Battlers Victor Sant 0 4,693 01-19-2012, 01:33 AM
Last Post: Victor Sant
   Victor Engine - Actors Battlers Victor Sant 0 5,391 12-21-2011, 07:50 AM
Last Post: Victor Sant
   Full Animated Side View Battle System Cybersam 6 23,271 03-18-2011, 04:31 AM
Last Post: Ashbane
   Animated Tileset kingartur2 5 10,727 02-08-2010, 04:26 AM
Last Post: DerVVulfman
   Trickster's Animated Gradient Bars for Limit Break (DVV) DerVVulfman 2 8,910 09-15-2009, 04:43 AM
Last Post: DerVVulfman



Users browsing this thread: