The RPG Maker Resource Kit

Other Game Creation => Program Troubleshooting => Topic started by: XPhater on March 22, 2006, 02:40:59 PM

Title: 2 handed weapon help, menu checking events
Post by: XPhater on March 22, 2006, 02:40:59 PM
I began by creating a weapon we'll call "Broadsword".  Then I created a "shield" item called "x2 hand".  The following parallel process is in the Common Events tab:

-Conditional Branch: Variable [0002: Heroswordequip] == 0
 -Conditional Branch: Hero [Heroname] [Broadsword] equipped
  -Change Armor: [x2 hand] + 1
  -Change equipped Items: [Heroname], Shield = [x2 hand]
  -Variable: [0002: Heroswordequip] = 1
   -
 : End
 -
: Else Handler
 -Conditional Branch: [Broadsword] possessed
  -Change Equipped Items: [Heroname], Shield = (None)
  -Change Armor: [x2 hand] - 1
  -Variable: [0002: Heroswordequip] = 0
  -
 : Else Handler
  -Conditional Branch: [x2 hand] possessed
   -Change Equipped Items: [Heroname], Weapon = (None)
   -Change Armor: [x2 hand] - 1
   -Variable: [0002: Heroswordequip] = 0
   -
  : End
  -
 : End
 -
: End
-

What this does is if the hero equips the Broadsword, the x2 hand item is spawned into inventory and automatically equipped.  If the hero unequips the Broadsword, then the x2 hand item is unequipped as well and removed from inventory.  If the hero unequips the x2 hand item directly, then the Broadsword as well is unequipped.  If you want the hero to use only 2 handed weapons, simply lock the Shield location in the Hero tab of the database, and the x2 hand item will still equip and unequip itself as intended.

The problem I'm having is that while the menu is open, the game engine is in a pause state.  It does not check for events while the menu is open.  You will not see the x2 hand item equipping and unequipping itself along with the Broadsword.  Nothing happens until you close the menu.  Is there a way, maybe with a script, to make the menu check for common events?
Title: 2 handed weapon help, menu checking events
Post by: Dalton on March 22, 2006, 10:48:16 PM
Yeah, the advanced weapons script.  It's very annoying but yu can find the newest version early on www.rmxp.net

You'll need to read the guys post to understand how to work it, as I am too lazy to lay out the tutorial for the script here
Title: 2 handed weapon help, menu checking events
Post by: XPhater on March 24, 2006, 10:49:08 AM
I found it, thanks a lot!

After playing around with it for a few hours I pretty much have figured out how to get it to do what I need it to.  Some heros have the standard 1hand sword+shield setup, while others can replace both items for a stronger 2hand sword, while other characters can replace the shield with a second 1hand weapon.  The sheer size of the script though is simply mind boggling.  The guy who wrote this must be a robot.