[XP] Secondary Weapon for Blizz-ABS

Started by Blizzard, December 04, 2008, 10:32:05 am

Previous topic - Next topic

RoseSkye

Necro (for good reason)

I noticed that the secondary button is nothing but a .. secondary button.

Example:
The first weapon is a arm bow with X range
the second weapon would be that as well as opposed to  feet or something thats not a arm bow.

Blizzard

Quote from: RoseSkye on August 06, 2009, 07:16:16 am
I noticed that the secondary button is nothing but a .. secondary button.


Well noticed.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

RoseSkye


Feildmaster

March 22, 2010, 07:04:11 pm #23 Last Edit: March 22, 2010, 08:19:18 pm by Feildmaster
I have found a minor ... quirk in the script.
I was just being stupid. =)
Me being stupid: ShowHide

Quoteif !$BlizzABS || BlizzABS::VERSION < 2.7
 raise 'ERROR: The "Blizz-ABS Controller" requires Blizz-ABS 2.7 or higher.'
elsif !defined?(RMXOS) || RMXOS::VERSION < 1.09
 raise 'ERROR: The "Blizz-ABS Controller" requires RMX-OS 1.09 or higher.'
end


First: Its elseif

it should be like so:
Quoteif !$BlizzABS || BlizzABS::VERSION < 2.7
 raise 'ERROR: The "Blizz-ABS Controller" requires Blizz-ABS 2.7 or higher.'
elseif !defined?(RMXOS) || RMXOS::VERSION < 1.09
 raise 'ERROR: The "Blizz-ABS Controller" requires RMX-OS 1.09 or higher.'
end
Pokemon Neon Characters: ShowHide

Aqua


Feildmaster

it is? Well sorry for being wrong. O.o I've never seen it done that way. xd

Oh i didn't have my ruby head on when i read that... >.>
Pokemon Neon Characters: ShowHide

The Niche

*Necroecho*

I've looked at trying to make this Guillame compatible, and of course, I'm stumped. Could anyone point me in the right direction?
Level me down, I'm trying to become the anti-blizz!
Quote from: winkio on June 15, 2011, 07:30:23 pm
Ah, excellent.  You liked my amusing sideshow, yes?  I'm just a simple fool, my wit entertains the wise, and my wisdom fools the fools.



I'm like the bible, widely hated and beautifully quotable.

Dropbox is this way, not any other way!

Aqua

class Map_Actor
 
  def use_attack2
    self.battler.weapon_id, self.battler.armor1_id =
        self.battler.armor1_id, self.battler.weapon_id
    result = (self.battler.weapon_id != 0 && use_attack)
    self.battler.weapon_id, self.battler.armor1_id =
        self.battler.armor1_id, self.battler.weapon_id
    return result
  end
 
end

#==============================================================================
# Game_Actor
#==============================================================================

class Game_Actor
 
  attr_accessor :weapon_id
  attr_accessor :armor1_id
 
end


Change all instances of armor1_id to the name of the variable holding the secondary weapon

The Niche

That was what I figured I should do, having looked at Blizz's answer to the last time this question was asked. But I can't figure out just what that variable is.
Level me down, I'm trying to become the anti-blizz!
Quote from: winkio on June 15, 2011, 07:30:23 pm
Ah, excellent.  You liked my amusing sideshow, yes?  I'm just a simple fool, my wit entertains the wise, and my wisdom fools the fools.



I'm like the bible, widely hated and beautifully quotable.

Dropbox is this way, not any other way!

Blizzard

It might be "weapon_ids[1]". And the base weapon could be "weapon_ids[0]" instead of "weapon_id".
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

The Niche

January 02, 2011, 08:06:46 am #30 Last Edit: January 02, 2011, 08:19:25 am by The Niche
Thanks, I'll go ahead and try that.

Nope, not working.
Level me down, I'm trying to become the anti-blizz!
Quote from: winkio on June 15, 2011, 07:30:23 pm
Ah, excellent.  You liked my amusing sideshow, yes?  I'm just a simple fool, my wit entertains the wise, and my wisdom fools the fools.



I'm like the bible, widely hated and beautifully quotable.

Dropbox is this way, not any other way!

The Niche

Gah...any ideas? Anyone? :???:

I noticed, for instance, that Guillame used the word slot, so I tried that instead of id, no joy.

More importantly, when I tried what you guys suggested, I get this:

undefined method '[]' for :weapon_ids:Symbol

The code, in case I misinterpreted or other such silly thing:

Spoiler: ShowHide
if !$BlizzABS || BlizzABS::VERSION < 2.1
  raise 'ERROR: The "Secondary Weapon" plugin requires Blizz-ABS 2.1 or higher.'
end

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

# button for secondary weapon
SECONDARY_WEAPON_BUTTON = Input::Key['L']

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

#==============================================================================
# BlizzABS::Controls
#==============================================================================

class BlizzABS::Controls
 
  alias update_attack_aqua_later update_attack
  def update_attack
    return true if update_attack_aqua_later
    if $game_system.attack_button && Input.trigger?(SECONDARY_WEAPON_BUTTON)
      $game_player.use_attack2
      return true
    end
    return false
  end
 
end

#==============================================================================
# Map_Actor
#==============================================================================

class Map_Actor
 
  def use_attack2
    self.battler.weapon_ids[1], self.battler.weapon_ids[1] =
        self.battler.weapon_ids[0], self.battler.weapon_ids[1]
    result = (self.battler.weapon_ids[0] != 0 && use_attack)
    self.battler.weapon_ids[1], self.battler.weapon_ids[0] =
        self.battler.weapon_ids[0], self.battler.weapon_ids[1]
    return result
  end
 
end

#==============================================================================
# Game_Actor
#==============================================================================

class Game_Actor
 
  attr_accessor :weapon_ids[0]
  attr_accessor :weapon_ids[1]
 
end

Level me down, I'm trying to become the anti-blizz!
Quote from: winkio on June 15, 2011, 07:30:23 pm
Ah, excellent.  You liked my amusing sideshow, yes?  I'm just a simple fool, my wit entertains the wise, and my wisdom fools the fools.



I'm like the bible, widely hated and beautifully quotable.

Dropbox is this way, not any other way!

Blizzard

It's not called weapon_ids but something else. Just look it up in Guillaume's script. Also, you don't need that last part of the script.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

The Niche

Quote from: Blizzard on January 06, 2011, 04:00:41 am
It's not called weapon_ids but something else. Just look it up in Guillaume's script. Also, you don't need that last part of the script.


Dude what? Defile Blizzard's scriOh no, I already did that by changing it. I'll have another look at the script, but if I end up in an asylum and I start writing it out on the walls, I'm blaming you.
Level me down, I'm trying to become the anti-blizz!
Quote from: winkio on June 15, 2011, 07:30:23 pm
Ah, excellent.  You liked my amusing sideshow, yes?  I'm just a simple fool, my wit entertains the wise, and my wisdom fools the fools.



I'm like the bible, widely hated and beautifully quotable.

Dropbox is this way, not any other way!

chaucer

is there anyway to set this so only 1 character could use this button O_o or 1 class lol. Im not good with scripting i dont know much about it but im tryin to learn. sorry any help?  :naughty: